Example #1
0
 public override void OnAfterSimulationFrame()
 {
     base.OnAfterSimulationFrame();
     if (Loader.CurrentLoadMode == LoadMode.LoadGame || Loader.CurrentLoadMode == LoadMode.NewGame)
     {
         uint currentFrameIndex = Singleton <SimulationManager> .instance.m_currentFrameIndex;
         int  num4 = (int)(currentFrameIndex & 255u);
         if (RealConstruction.IsEnabled)
         {
             BuildingManager instance = Singleton <BuildingManager> .instance;
             if (num4 == 255)
             {
                 PlayerBuildingUI.refeshOnce     = true;
                 UniqueFactoryUI.refeshOnce      = true;
                 UniqueFactoryButton.refeshOnce  = true;
                 WarehouseButton.refeshOnce      = true;
                 WareHouseUI.refeshOnce          = true;
                 PlayerBuildingButton.refeshOnce = true;
                 if (!isFirstTime)
                 {
                     if (Loader.isRealCityRunning)
                     {
                         reduceVehicle = (bool)_reduceVehicle.GetValue(RealCityInstance);
                         if (reduceVehicle)
                         {
                             reduceCargoDiv = (int)_reduceCargoDiv.GetValue(MainDataStoreInstance);
                         }
                         else
                         {
                             reduceCargoDiv = 1;
                         }
                     }
                     else
                     {
                         reduceVehicle  = false;
                         reduceCargoDiv = 1;
                     }
                     //DebugLog.LogToFileOnly("Info: reduceVehicle = " + reduceVehicle.ToString());
                     //DebugLog.LogToFileOnly("Info: reduceCargoDiv = " + reduceCargoDiv.ToString());
                 }
             }
             //CustomSimulationStepImpl for 124 125 TransferReason
             CustomTransferManager.CustomSimulationStepImpl();
         }
     }
 }
        public override void OnAfterSimulationFrame()
        {
            base.OnAfterSimulationFrame();
            if (Loader.CurrentLoadMode == LoadMode.LoadGame || Loader.CurrentLoadMode == LoadMode.NewGame)
            {
                if (RealGasStation.IsEnabled)
                {
                    uint currentFrameIndex = Singleton <SimulationManager> .instance.m_currentFrameIndex;
                    int  num4 = (int)(currentFrameIndex & 255u);
                    if (num4 == 255)
                    {
                        PlayerBuildingUI.refeshOnce = true;
                    }

                    CustomTransferManager.CustomSimulationStepImpl();
                }
            }
        }
        public override void OnAfterSimulationFrame()
        {
            base.OnAfterSimulationFrame();
            if (Loader.CurrentLoadMode == LoadMode.LoadGame || Loader.CurrentLoadMode == LoadMode.NewGame)
            {
                if (RealGasStation.IsEnabled)
                {
                    uint            currentFrameIndex = Singleton <SimulationManager> .instance.m_currentFrameIndex;
                    BuildingManager instance          = Singleton <BuildingManager> .instance;
                    int             num4 = (int)(currentFrameIndex & 255u);
                    if (num4 == 255)
                    {
                        PlayerBuildingUI.refeshOnce = true;
                        if (!isFirstTime)
                        {
                            if (Loader.isRealCityRunning)
                            {
                                reduceVehicle = (bool)_reduceVehicle.GetValue(RealCityInstance);
                                if (reduceVehicle)
                                {
                                    reduceCargoDiv = (int)_reduceCargoDiv.GetValue(MainDataStoreInstance);
                                }
                                else
                                {
                                    reduceCargoDiv = 1;
                                }
                            }
                            else
                            {
                                reduceVehicle  = false;
                                reduceCargoDiv = 1;
                            }
                        }
                    }

                    CustomTransferManager.CustomSimulationStepImpl();
                }
            }
        }
 public override void OnAfterSimulationFrame()
 {
     base.OnAfterSimulationFrame();
     if (Loader.CurrentLoadMode == LoadMode.LoadGame || Loader.CurrentLoadMode == LoadMode.NewGame)
     {
         uint currentFrameIndex = Singleton <SimulationManager> .instance.m_currentFrameIndex;
         int  num4 = (int)(currentFrameIndex & 255u);
         if (RealConstruction.IsEnabled)
         {
             BuildingManager instance = Singleton <BuildingManager> .instance;
             if (num4 == 255)
             {
                 PlayerBuildingUI.refeshOnce     = true;
                 UniqueFactoryUI.refeshOnce      = true;
                 UniqueFactoryButton.refeshOnce  = true;
                 WarehouseButton.refeshOnce      = true;
                 WareHouseUI.refeshOnce          = true;
                 PlayerBuildingButton.refeshOnce = true;
             }
             //CustomSimulationStepImpl for 124 125 TransferReason
             CustomTransferManager.CustomSimulationStepImpl();
         }
     }
 }