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(); } } } }
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"); } } } }
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"); } } }
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(); } } }
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"); } } } }
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"); } } } }