Added HUD sections to the Flight Engineer.
[VesselSimulator.git] / KerbalEngineer / Flight / Readouts / Vessel / SimulationProcessor.cs
blob:a/KerbalEngineer/Flight/Readouts/Vessel/SimulationProcessor.cs -> blob:b/KerbalEngineer/Flight/Readouts/Vessel/SimulationProcessor.cs
--- a/KerbalEngineer/Flight/Readouts/Vessel/SimulationProcessor.cs
+++ b/KerbalEngineer/Flight/Readouts/Vessel/SimulationProcessor.cs
@@ -1,16 +1,43 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+// 
+//     Kerbal Engineer Redux
+// 
+//     Copyright (C) 2014 CYBUTEK
+// 
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+// 
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+// 
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+// 
+
+#region Using Directives
+
+using System;
 
 using KerbalEngineer.VesselSimulator;
+
+#endregion
 
 namespace KerbalEngineer.Flight.Readouts.Vessel
 {
     public class SimulationProcessor : IUpdatable, IUpdateRequest
     {
         #region Instance
+
+        #region Fields
+
         private static readonly SimulationProcessor instance = new SimulationProcessor();
+
+        #endregion
+
+        #region Properties
 
         /// <summary>
         ///     Gets the current instance of the simulation processor.
@@ -19,9 +46,17 @@
         {
             get { return instance; }
         }
+
+        #endregion
+
         #endregion
 
         #region Properties
+
+        /// <summary>
+        ///     Gets the currently active vessel stage.
+        /// </summary>
+        public static Stage LastStage { get; private set; }
 
         /// <summary>
         ///     Gets whether the details are ready to be shown.
@@ -33,12 +68,16 @@
         /// </summary>
         public static Stage[] Stages { get; private set; }
 
-        /// <summary>
-        ///     Gets the currently active vessel stage.
-        /// </summary>
-        public static Stage LastStage { get; private set; }
+        public bool UpdateRequested { get; set; }
 
         #endregion
+
+        #region Methods: public
+
+        public static void RequestUpdate()
+        {
+            instance.UpdateRequested = true;
+        }
 
         public void Update()
         {
@@ -57,12 +96,11 @@
                 ShowDetails = true;
             }
 
-
             if (FlightGlobals.ActiveVessel != null)
             {
                 SimManager.Gravity = FlightGlobals.ActiveVessel.mainBody.gravParameter /
-                                        Math.Pow(FlightGlobals.ActiveVessel.mainBody.Radius +
-                                                    FlightGlobals.ActiveVessel.mainBody.GetAltitude(FlightGlobals.ActiveVessel.CoM), 2);
+                                     Math.Pow(FlightGlobals.ActiveVessel.mainBody.Radius +
+                                              FlightGlobals.ActiveVessel.mainBody.GetAltitude(FlightGlobals.ActiveVessel.CoM), 2);
                 SimManager.Velocity = FlightGlobals.ActiveVessel.srfSpeed;
             }
             // Cybutek: We should be allowing this to be set too but not sure where you want to put the control
@@ -70,12 +108,6 @@
             SimManager.TryStartSimulation();
         }
 
-        public bool UpdateRequested { get; set; }
-
-        public static void RequestUpdate()
-        {
-            instance.UpdateRequested = true;
-        }
+        #endregion
     }
 }
-