示例#1
0
        public VTMap getMap()
        {
            VTMap map;

            support.WriteLog($"Looking for Map ID {VTScenario.current.mapID}");
            map = VTResources.GetMap(VTScenario.current.mapID);
            support.WriteLog("Done looking for map id");
            if (map == null)
            {
                support.WriteLog("Getting custom map 1");
                VTMapCustom custommap = VTResources.GetCustomMap(VTScenario.current.mapID);
                return(custommap);
            }
            if (map == null)
            {
                support.WriteLog("Getting custom map 2");
                VTMapCustom custommap = VTResources.GetSteamWorkshopMap(VTScenario.current.mapID);
                return(custommap);
            }

            support.WriteLog("MM check");
            if (mm != null)
            {
                support.WriteLog("MM exists, Map null check?");
                if (map == null)
                {
                    support.WriteLog("Map not null. Get map from map manager");
                    return(VTMapManager.fetch.map);
                }
                else
                {
                    support.WriteLog("Map is null");
                }
            }
            else
            {
                support.WriteLog("Map Manager is null");
            }


            if (map != null)
            {
                support.WriteLog("Returning map.");
                return(map);
            }
            else
            {
                support.WriteLog("Unable to find a valid VTMap!");
                return(null);
            }
        }
示例#2
0
        public VTMap getMap()
        {
            VTMap map;

            support.WriteLog($"Looking for Map ID {VTScenario.current.mapID}");
            map = VTResources.GetMap(VTScenario.current.mapID);
            if (map == null)
            {
                VTMapCustom custommap = VTResources.GetCustomMap(VTScenario.current.mapID);
                return(custommap);
            }
            if (map == null)
            {
                VTMapCustom custommap = VTResources.GetSteamWorkshopMap(VTScenario.current.mapID);
                return(custommap);
            }

            if (mm != null)
            {
                if (map == null)
                {
                    support.WriteLog("Got map from map manager");
                    return(VTMapManager.fetch.map);
                }
            }
            else
            {
                support.WriteLog("Map Manager is null");
            }



            if (map != null)
            {
                return(map);
            }
            else
            {
                support.WriteLog("Unable to find a valid VTMap!");
                return(null);
            }
        }