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(); }); }
public static void Unload() { Log.Debug("LifeCycle.Unload() called"); UninstallHarmony(); NetInfoUtil.RestoreMaxTurnAngles(); NetInfoUtil.UnloadDCTextures(); }
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; }