Added deltaV readouts.
[VesselSimulator.git] / KerbalEngineer / Editor / BuildAdvanced.cs
blob:a/KerbalEngineer/Editor/BuildAdvanced.cs -> blob:b/KerbalEngineer/Editor/BuildAdvanced.cs
--- a/KerbalEngineer/Editor/BuildAdvanced.cs
+++ b/KerbalEngineer/Editor/BuildAdvanced.cs
@@ -182,17 +182,17 @@
                 }

 

                 // Configure the simulation parameters based on the selected reference body.

-                SimulationManager.Gravity = CelestialBodies.Instance.SelectedBodyInfo.Gravity;

+                SimulationManager.Instance.Gravity = CelestialBodies.Instance.SelectedBodyInfo.Gravity;

                 if (this.useAtmosphericDetails)

                 {

-                    SimulationManager.Atmosphere = CelestialBodies.Instance.SelectedBodyInfo.Atmosphere * 0.01d;

+                    SimulationManager.Instance.Atmosphere = CelestialBodies.Instance.SelectedBodyInfo.Atmosphere * 0.01d;

                 }

                 else

                 {

-                    SimulationManager.Atmosphere = 0;

-                }

-

-                SimulationManager.TryStartSimulation();

+                    SimulationManager.Instance.Atmosphere = 0;

+                }

+

+                SimulationManager.Instance.TryStartSimulation();

             }

             catch

             {

@@ -209,7 +209,7 @@
                     return;

                 }

 

-                SimulationManager.RequestSimulation();

+                SimulationManager.Instance.RequestSimulation();

 

                 // Change the window title based on whether in compact mode or not.

                 string title;

@@ -223,7 +223,7 @@
                 }

 

                 // Reset the window size when the staging or something else has changed.

-                int stageCount = SimulationManager.Stages.Count(stage => this.showAllStages || stage.DeltaV > 0);

+                int stageCount = SimulationManager.Instance.Stages.Count(stage => this.showAllStages || stage.DeltaV > 0);

                 if (this.hasChanged || stageCount != this.numberOfStages)

                 {

                     this.hasChanged = false;

@@ -359,7 +359,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(30.0f));

             GUILayout.Label(string.Empty, this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -376,7 +376,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(50.0f));

             GUILayout.Label("PARTS", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -393,7 +393,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(100.0f));

             GUILayout.Label("COST", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -410,7 +410,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(100.0f));

             GUILayout.Label("MASS", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -427,7 +427,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(50.0f));

             GUILayout.Label("ISP", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -444,7 +444,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(75.0f));

             GUILayout.Label("THRUST", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -461,7 +461,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(50.0f));

             GUILayout.Label("TWR", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -478,7 +478,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(100.0f));

             GUILayout.Label("DELTA-V", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {

@@ -495,7 +495,7 @@
         {

             GUILayout.BeginVertical(GUILayout.Width(75.0f));

             GUILayout.Label("BURN", this.titleStyle);

-            foreach (var stage in SimulationManager.Stages)

+            foreach (var stage in SimulationManager.Instance.Stages)

             {

                 if (this.showAllStages || stage.DeltaV > 0)

                 {