Пример #1
0
        static void RefreshDCFlags()
        {
            try {
                if (Helpers.InStartupMenu)
                {
                    return;
                }
                Log.Called();

                SimulationManager.instance.ForcedSimulationPaused = true;
                NetInfoUtil.RestoreFlags();
                NetInfoUtil.RestoreMaxTurnAngles();

                NetInfoUtil.FixMaxTurnAngles();
                NetInfoUtil.FixDCFlags();
            } catch (Exception ex) {
                ex.Log();
            } finally {
                SimulationManager.instance.ForcedSimulationPaused = false;
            }

            SimulationManager.instance.AddAction(delegate() {
                NetInfoUtil.UpdateAllNodeRenderers();
            });
        }
Пример #2
0
 public static void Unload()
 {
     Log.Debug("LifeCycle.Unload() called");
     UninstallHarmony();
     NetInfoUtil.RestoreMaxTurnAngles();
     NetInfoUtil.UnloadDCTextures();
 }
Пример #3
0
 public static void ExitToMainMenu()
 {
     if (!Loaded)
     {
         return;          // protect against Disabling mod from main menu.
     }
     LogCalled();
     UI.DCRTool.Release();
     NetInfoUtil.RestoreFlags();
     NetInfoUtil.RestoreMaxTurnAngles();
     NetInfoUtil.UnloadDCTextures();
     Loaded = false;
 }