Beispiel #1
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);
            if (mode != LoadMode.NewGame && mode != LoadMode.NewGameFromScenario && mode != LoadMode.LoadGame)
            {
                return;
            }
            Detours.Deploy();
            SimulationManager.instance.AddAction(() => Object.FindObjectOfType <RenderProperties>().m_edgeFogDistance = 2800f);
            SimulationManager.instance.AddAction(() => Object.FindObjectOfType <FogEffect>().m_edgeFogDistance        = 2800f);
            SimulationManager.instance.AddAction(() => Object.FindObjectOfType <FogProperties>().m_EdgeFogDistance    = 2800f);
            if (Util.IsModActive(Mod.ALL_TILES_START_MOD))
            {
                UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage(
                    "81 Tiles - Incompatible mod detected",
                    $"'81 Tiles' isn't compatible with 'All Tile Start' mod!\nPlease unsubscribe that mod and use '{Mod.UNLOCK_ALL_TILES_FOR_FREE}' button in '81 Tiles' options entry!",
                    false);
            }
            SimulationManager.instance.AddAction(FixNotInIndustryAreaProblem);
            SimulationManager.instance.AddAction(FixNotInCampusAreaProblem);

            if (Enum.GetNames(typeof(DistrictPark.ParkType)).Length > 14)
            {
                UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage("81 Tiles self-check: new park types detected", "This new version of the game added new park types. 81 Tiles has to be updated in order to not get 'Not in X area' errors on save re-load", false);
            }

            if (Enum.GetNames(typeof(ImmaterialResourceManager.Resource)).Length > 28)
            {
                UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage("81 Tiles self-check: new resource types detected", "This new version of the game added new resource types. 81 Tiles has to be updated!", false);
            }
        }
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     if (mode != LoadMode.NewGame && mode != LoadMode.NewGameFromScenario && mode != LoadMode.LoadGame)
     {
         return;
     }
     Detours.Deploy();
     SimulationManager.instance.AddAction(() => Object.FindObjectOfType <RenderProperties>().m_edgeFogDistance = 2800f);
     SimulationManager.instance.AddAction(() => Object.FindObjectOfType <FogEffect>().m_edgeFogDistance        = 2800f);
     SimulationManager.instance.AddAction(() => Object.FindObjectOfType <FogProperties>().m_EdgeFogDistance    = 2800f);
     if (Util.IsModActive(Mod.ALL_TILES_START_MOD))
     {
         UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage(
             "81 Tiles - Incompatible mod detected",
             $"'81 Tiles' isn't compatible with 'All Tile Start' mod!\nPlease unsubscribe that mod and use '{Mod.UNLOCK_ALL_TILES_FOR_FREE}' button in '81 Tiles' options entry!",
             false);
     }
 }