Пример #1
0
        protected void InitializeEditorConstruct(ShipConstruct ship, bool forceReset)
        {
            dataReady = false;
            if (ship != null)
            {
                if (simulator == null)
                {
                    simulator = new SystemHeatSimulator();
                    simulator.Reset(ship.Parts);
                }

                if (simulator != null && forceReset)
                {
                    simulator.Reset(ship.Parts);
                    simulator.ResetTemperatures();
                }
                else
                {
                    simulator.Refresh(ship.Parts);
                    simulator.ResetTemperatures();
                }

                dataReady = true;
            }
            else
            {
                if (SystemHeatSettings.DebugSimulation)
                {
                    Utils.Log(String.Format("[SystemHeatEditor]: Ship is null"));
                }
                simulator = new SystemHeatSimulator();
            }
        }
Пример #2
0
        /// <summary>
        /// Rebuild all the loops from scratch
        /// </summary>
        protected void ResetSimulation()
        {
            if (vessel == null || vessel.Parts == null)
            {
                return;
            }


            Utils.Log(String.Format("[SystemHeatVessel]: Resetting Simulation for {0}", vessel.name), LogType.Simulator);

            if (simulator != null)
            {
                simulator.Reset(vessel.Parts);
            }
        }
Пример #3
0
        /// <summary>
        /// Rebuild all the loops from scratch
        /// </summary>
        protected void ResetSimulation()
        {
            if (vessel == null || vessel.Parts == null)
            {
                return;
            }

            if (SystemHeatSettings.DebugSimulation)
            {
                Utils.Log(String.Format("[SystemHeatVessel]: Resetting Simulation for {0}", vessel.name));
            }

            if (simulator != null)
            {
                simulator.Reset(vessel.Parts);
            }
        }