示例#1
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     CurrentLoadMode = mode;
     if (RealCity.IsEnabled)
     {
         if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
         {
             isTransportLinesManagerRunning = CheckTransportLinesManagerIsLoaded();
             DebugLog.LogToFileOnly($"Check TLM running = {isTransportLinesManagerRunning}");
             isRealTimeRunning = CheckRealTimeIsLoaded();
             DebugLog.LogToFileOnly($"Check RealTime running = {isRealTimeRunning}");
             isTransportLinesManagerRunning = isTransportLinesManagerRunning || (!isRealTimeRunning);
             //refresh OptionsMainPanel
             MethodInfo method = typeof(OptionsMainPanel).GetMethod("OnLocaleChanged", BindingFlags.Instance | BindingFlags.NonPublic);
             method.Invoke(UIView.library.Get <OptionsMainPanel>("OptionsPanel"), new object[0]);
             SetupGui();
             HarmonyInitDetour();
             OptionUI.LoadSetting();
             RealCityThreading.isFirstTime = true;
             DebugLog.LogToFileOnly("OnLevelLoaded");
             if (mode == LoadMode.NewGame)
             {
                 InitData();
             }
         }
         else
         {
             if (RealCity.IsEnabled)
             {
                 HarmonyRevertDetour();
             }
         }
     }
 }
示例#2
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);
            CurrentLoadMode = mode;
            if (CSURToolBox.IsEnabled)
            {
                if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame || mode == LoadMode.NewMap || mode == LoadMode.LoadMap || mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
                {
                    OptionUI.LoadSetting();
                    SetupGui();
                    if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
                    {
                        CheckTMPE();
                    }
                    InitDetour();
                    HarmonyInitDetour();
                    if (OptionUI.enablePillar)
                    {
                        InstallPillar();
                    }
                    OptionUI.isDebug = false;
                    if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
                    {
                        if (OptionUI.disableZone)
                        {
                            DisableZone();
                        }

                        if (OptionUI.disableWideRoadZone)
                        {
                            DisableWideRoadZone();
                        }

                        if (OptionUI.disableBikeRoadZone)
                        {
                            DisableBikeRoadZone();
                        }
                    }

                    ChangeDefaultSpeedAndConstructionFee();
                    Debug.Log("OnLevelLoaded");
                    if (mode == LoadMode.NewGame)
                    {
                        //InitData();
                        Debug.Log("InitData");
                    }
                }
            }
        }
示例#3
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     CurrentLoadMode = mode;
     if (AdvancedRoadTools.IsEnabled)
     {
         if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame || mode == LoadMode.NewMap || mode == LoadMode.LoadMap || mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
         {
             OptionUI.LoadSetting();
             SetupGui();
             SetupTools();
             DebugLog.LogToFileOnly("OnLevelLoaded");
         }
     }
 }
示例#4
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     Loader.CurrentLoadMode = mode;
     if (RushHourPublicTransportHelper.IsEnabled)
     {
         if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
         {
             InitDetour();
             Threading.isFirstTime = true;
             Loader.SetupGui();
             OptionUI.LoadSetting();
         }
     }
 }
示例#5
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     CurrentLoadMode = mode;
     if (CSUR_UI.IsEnabled)
     {
         if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame || mode == LoadMode.NewMap || mode == LoadMode.LoadMap || mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
         {
             OptionUI.LoadSetting();
             SetupGui();
             DebugLog.LogToFileOnly("OnLevelLoaded");
             if (mode == LoadMode.NewGame)
             {
                 //InitData();
                 DebugLog.LogToFileOnly("InitData");
             }
         }
     }
 }
示例#6
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     CurrentLoadMode = mode;
     if (CSURToolBox.IsEnabled)
     {
         if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame || mode == LoadMode.NewMap || mode == LoadMode.LoadMap || mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
         {
             OptionUI.LoadSetting();
             DataInit();
             SetupGui();
             if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
             {
                 CheckTMPE();
             }
             InitDetour();
             HarmonyInitDetour();
             if (OptionUI.enablePillar)
             {
                 InstallPillar();
             }
             OptionUI.isDebug = false;
             if (mode == LoadMode.LoadGame || mode == LoadMode.NewGame)
             {
                 if (OptionUI.disableZone)
                 {
                     DisableZone();
                 }
             }
             RefreshSegment();
             RefreshNode();
             Debug.Log("OnLevelLoaded");
             if (mode == LoadMode.NewGame)
             {
                 //InitData();
                 Debug.Log("InitData");
             }
         }
     }
 }