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 Load() { Log.Debug("LifeCycle.Load() called"); CheckMedianCommons.Init(); InstallHarmony(); NetInfoUtil.LoadDCTextures(); NetInfoUtil.FixMaxTurnAngles(); }
public static void SimulationDataReady() { try { LogCalled(); if (!Loaded) { NetInfoUtil.GenerateDCTextures(); NetInfoUtil.FixMaxTurnAngles(); NetInfoUtil.FixDCFlags(); if (DCRConfig.Config.RefreshOnStartup) { DCRSettings.RefreshNetworks(); } } Loaded = true; } catch (Exception e) { Log.Exception(e); } }