Added sane window start positions and states. 0.9.9
[VOID.git] / VOIDFlightMaster.cs
blob:a/VOIDFlightMaster.cs -> blob:b/VOIDFlightMaster.cs
--- a/VOIDFlightMaster.cs
+++ b/VOIDFlightMaster.cs
@@ -56,7 +56,7 @@
 		{
 			if (this.Core == null)
 			{
-				return;
+				this.Awake();
 			}
 
 			this.Core.Update ();
@@ -65,6 +65,13 @@
 			{
 				SimManager.Instance.Gravity = VOID_Core.Instance.vessel.mainBody.gravParameter / Math.Pow(VOID_Core.Instance.vessel.mainBody.Radius, 2);
 				SimManager.Instance.TryStartSimulation();
+			}
+
+			if (this.Core.factoryReset)
+			{
+				KSP.IO.File.Delete<VOID_Core>("config.xml");
+				this.Core = null;
+				VOID_Core.Reset();
 			}
 		}