Esempio n. 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();
            });
        }
Esempio n. 2
0
        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);
            }
        }