static void RefreshDC() { try { if (Helpers.InStartupMenu) { return; } Log.Called(); SimulationManager.instance.ForcedSimulationPaused = true; NetInfoUtil.RestoreFlags(); NetInfoUtil.RestoreMaxTurnAngles(); NetInfoUtil.UnloadDCTextures(); NetInfoUtil.GenerateDCTextures(); NetInfoUtil.FixMaxTurnAngles(); NetInfoUtil.FixDCFlags(); } catch (Exception ex) { ex.Log(); } finally { SimulationManager.instance.ForcedSimulationPaused = false; } SimulationManager.instance.AddAction(delegate() { NetInfoUtil.UpdateAllNodeRenderers(); }); }
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); } }