New celestial body system and bundled MiniAVC.
New celestial body system and bundled MiniAVC.

file:b/.gitattributes (new)
--- /dev/null
+++ b/.gitattributes
@@ -1,1 +1,64 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
 
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs     diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following 
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln       merge=binary
+#*.csproj    merge=binary
+#*.vbproj    merge=binary
+#*.vcxproj   merge=binary
+#*.vcproj    merge=binary
+#*.dbproj    merge=binary
+#*.fsproj    merge=binary
+#*.lsproj    merge=binary
+#*.wixproj   merge=binary
+#*.modelproj merge=binary
+#*.sqlproj   merge=binary
+#*.wwaproj   merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg   binary
+#*.png   binary
+#*.gif   binary
+
+###############################################################################
+# diff behavior for common document formats
+# 
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the 
+# entries below.
+###############################################################################
+#*.doc   diff=astextplain
+#*.DOC   diff=astextplain
+#*.docx  diff=astextplain
+#*.DOCX  diff=astextplain
+#*.dot   diff=astextplain
+#*.DOT   diff=astextplain
+#*.pdf   diff=astextplain
+#*.PDF   diff=astextplain
+#*.rtf   diff=astextplain
+#*.RTF   diff=astextplain
+

--- a/KerbalEngineer/CelestialBodies.cs
+++ b/KerbalEngineer/CelestialBodies.cs
@@ -1,157 +1,213 @@
-// 

-//     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.Collections.Generic;

-using UnityEngine;

-

-#endregion

-

-namespace KerbalEngineer

-{

-    public class CelestialBodies

-    {

-        #region Instance

-

-        private static CelestialBodies _instance;

-

-        /// <summary>

-        ///     Gets or creates a global instance to be used.

-        /// </summary>

-        public static CelestialBodies Instance

-        {

-            get { return _instance ?? (_instance = new CelestialBodies()); }

-        }

-

-        #endregion

-

-        #region Fields

-

-        private string selectedBodyName;

-

-        #endregion

-

-        #region Properties

-

-        /// <summary>

-        ///     Gets a list of BodyInfo objects.

-        /// </summary>

-        public Dictionary<string, BodyInfo> BodyList { get; private set; }

-

-        /// <summary>

-        ///     Gets and sets the selected body name.

-        /// </summary>

-        public string SelectedBodyName

-        {

-            get { return this.selectedBodyName; }

-            set

-            {

-                this.selectedBodyName = value;

-                if (this.BodyList.ContainsKey(this.selectedBodyName))

-                {

-                    this.SelectedBodyInfo = this.BodyList[this.selectedBodyName];

-                }

-            }

-        }

-

-        /// <summary>

-        ///     Gets the selected BodyInfo object.

-        /// </summary>

-        public BodyInfo SelectedBodyInfo { get; private set; }

-

-        #endregion

-

-        #region Initialisation

-

-	private CelestialBodies()

-	{

-		this.BodyList = new Dictionary<string, BodyInfo>();

-

-		//

-		// Change by Nathaniel R. Lewis (aka. Teknoman117) (linux.robotdude@gmail.com)

-		// 

-		// Generate the bodies list by crawling the core's local body list.  This allows

-		// Kerbal Engineer to automatically support any future worlds Squad may add 

-		// and provide compatibility with world adding mods such as Kopernicus and Planet

-		// Factory.

-		//

-		foreach (CelestialBody cb in PSystemManager.Instance.localBodies) 

-		{

-			// Generate a list of the names of the bodies orbiting this one (if it has orbiting bodies)

-			List<string> orbitingBodies = null;

-			if (cb.orbitingBodies != null && cb.orbitingBodies.Count > 0) 

-			{

-				orbitingBodies = new List<string> ();

-				foreach (CelestialBody ob in cb.orbitingBodies)

-				{

-					orbitingBodies.Add (ob.bodyName);

-				}

-			}

-

-			// Only add if not the root body in the system (Sun in stock, black hole in Star Systems) (cb.referenceBody != cb detects the circular reference of Kerbol)

-			if (cb.referenceBody != null && cb.referenceBody != cb) 

-			{

-				// Compute atmospheric (in kPa) and gravitational properties (m/s^2)

-				double gravitationalAccelerationASL = 9.81d * cb.GeeASL; 

-				double atmosphericPressureASL = cb.atmosphere ? (101.325d * cb.atmosphereMultiplier) : 0d;

-

-				// Add this body info

-				this.AddBody (new BodyInfo (cb.bodyName, gravitationalAccelerationASL, atmosphericPressureASL, cb.referenceBody.bodyName, (orbitingBodies != null) ? orbitingBodies.ToArray () : null));

-			}

-		}

-

-		this.SelectedBodyName = "Kerbin";

-	}

-

-        #endregion

-

-        #region Methods

-

-        private void AddBody(BodyInfo bodyInfo)

-        {

-            this.BodyList.Add(bodyInfo.Name, bodyInfo);

-        }

-

-        #endregion

-

-        #region Embedded Classes

-

-        public class BodyInfo

-        {

-            public BodyInfo(string name, double gravity, double atmosphere, string parent, string[] children)

-            {

-                this.Name = name;

-                this.Gravity = gravity;

-                this.Atmosphere = atmosphere;

-                this.Parent = parent;

-                this.Children = children;

-            }

-

-            public string Name { get; protected set; }

-            public double Gravity { get; protected set; }

-            public double Atmosphere { get; protected set; }

-            public string Parent { get; protected set; }

-            public string[] Children { get; protected set; }

-        }

-

-        #endregion

-    }

-}

-
+// 
+//     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 System.Collections.Generic;
+using System.Linq;
+
+#endregion
+
+namespace KerbalEngineer
+{
+    public static class CelestialBodies
+    {
+        #region Constructors
+
+        static CelestialBodies()
+        {
+            try
+            {
+                SystemBody = new BodyInfo(PSystemManager.Instance.localBodies.Find(b => b.referenceBody == null || b.referenceBody == b));
+                if (!SetSelectedBody("Kerbin"))
+                {
+                    SelectedBody = SystemBody;
+                    SelectedBody.SetSelected(true);
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        #endregion
+
+        #region Properties
+
+        public static BodyInfo SelectedBody { get; private set; }
+        public static BodyInfo SystemBody { get; private set; }
+
+        #endregion
+
+        #region Public Methods
+
+        /// <summary>
+        ///     Gets a body given a supplied body name.
+        /// </summary>
+        public static BodyInfo GetBodyInfo(string bodyName)
+        {
+            try
+            {
+                return SystemBody.GetBodyInfo(bodyName);
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+            return null;
+        }
+
+        /// <summary>
+        ///     Sets the selected body to one matching the supplied body name.  Returns true if successful.
+        /// </summary>
+        public static bool SetSelectedBody(string bodyName)
+        {
+            try
+            {
+                var body = GetBodyInfo(bodyName);
+                if (body != null)
+                {
+                    if (SelectedBody != null)
+                    {
+                        SelectedBody.SetSelected(false);
+                    }
+                    SelectedBody = body;
+                    SelectedBody.SetSelected(true);
+                    return true;
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+            return false;
+        }
+
+        #endregion
+
+        #region Nested type: BodyInfo
+
+        public class BodyInfo
+        {
+            #region Constructors
+
+            public BodyInfo(CelestialBody body, BodyInfo parent = null)
+            {
+                try
+                {
+                    // Set the body information.
+                    this.CelestialBody = body;
+                    this.Name = body.bodyName;
+                    this.Gravity = 9.81 * body.GeeASL;
+                    this.Atmosphere = body.atmosphere ? 101.325 * body.atmosphereMultiplier : 0;
+                    this.Parent = parent;
+
+                    // Set orbiting bodies information.
+                    this.Children = new List<BodyInfo>();
+                    foreach (var orbitingBody in body.orbitingBodies)
+                    {
+                        this.Children.Add(new BodyInfo(orbitingBody, this));
+                    }
+
+                    this.SelectedDepth = 0;
+                }
+                catch (Exception ex)
+                {
+                    Logger.Exception(ex);
+                }
+            }
+
+            #endregion
+
+            #region Properties
+
+            public string Name { get; private set; }
+            public double Gravity { get; private set; }
+            public double Atmosphere { get; private set; }
+            public BodyInfo Parent { get; private set; }
+            public List<BodyInfo> Children { get; private set; }
+            public CelestialBody CelestialBody { get; private set; }
+            public bool Selected { get; private set; }
+            public int SelectedDepth { get; private set; }
+
+            #endregion
+
+            #region Public Methods
+
+            public BodyInfo GetBodyInfo(string bodyName)
+            {
+                try
+                {
+                    // This is the searched body.
+                    if (String.Equals(this.Name, bodyName, StringComparison.CurrentCultureIgnoreCase))
+                    {
+                        return this;
+                    }
+
+                    // Check to see if any of this bodies children are the searched body.
+                    foreach (var child in this.Children)
+                    {
+                        var body = child.GetBodyInfo(bodyName);
+                        if (body != null)
+                        {
+                            return body;
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Logger.Exception(ex);
+                }
+
+                // A body with the specified name was not found.
+                return null;
+            }
+
+            public void SetSelected(bool state, int depth = 0)
+            {
+                this.Selected = state;
+                this.SelectedDepth = depth;
+                if (this.Parent != null)
+                {
+                    this.Parent.SetSelected(state, depth + 1);
+                }
+            }
+
+            #endregion
+
+            #region Debugging
+
+            public override string ToString()
+            {
+                var log = "\n" + this.Name +
+                          "\n\tGravity: " + this.Gravity +
+                          "\n\tAtmosphere: " + this.Atmosphere +
+                          "\n\tSelected: " + this.Selected;
+
+                return this.Children.Aggregate(log, (current, child) => current + "\n" + child);
+            }
+
+            #endregion
+        }
+
+        #endregion
+    }
+}

--- a/KerbalEngineer/Editor/BuildAdvanced.cs
+++ b/KerbalEngineer/Editor/BuildAdvanced.cs
@@ -1,869 +1,834 @@
-// 

-//     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 System.Linq;

-

-using KerbalEngineer.Extensions;

-using KerbalEngineer.Flight;

-using KerbalEngineer.Settings;

-using KerbalEngineer.VesselSimulator;

-

-using UnityEngine;

-

-#endregion

-

-namespace KerbalEngineer.Editor

-{

-    [KSPAddon(KSPAddon.Startup.EditorAny, false)]

-    public class BuildAdvanced : MonoBehaviour

-    {

-        #region Instance

-

-        /// <summary>

-        ///     Gets the current instance if started or returns null.

-        /// </summary>

-        public static BuildAdvanced Instance { get; private set; }

-

-        #endregion

-

-        #region Fields

-

-        private float atmosphericPercentage = 1.0f;

-        private float atmosphericVelocity;

-        private int compactCheck;

-        private bool compactCollapseRight;

-        private float compactRight;

-        private bool hasChanged;

-        private bool isEditorLocked;

-        private int numberOfStages;

-        private int windowId;

-        private Rect windowPosition = new Rect(265.0f, 45.0f, 0, 0);

-        private Stage[] stages;

-

-        #region Styles

-

-        private GUIStyle areaBodiesStyle;

-        private GUIStyle areaSettingStyle;

-        private GUIStyle areaStyle;

-        private GUIStyle buttonStyle;

-        private GUIStyle infoStyle;

-        private GUIStyle settingStyle;

-        private GUIStyle settingAtmoStyle;

-        private GUIStyle titleStyle;

-        private GUIStyle windowStyle;

-

-        #endregion

-

-        #endregion

-

-        #region Properties

-

-        private bool compactMode;

-        private bool showAllStages;

-        private bool showAtmosphericDetails;

-        private bool showReferenceBodies;

-        private bool showSettings;

-        private bool visible = true;

-

-        /// <summary>

-        ///     Gets and sets whether the display is enabled.

-        /// </summary>

-        public bool Visible

-        {

-            get { return this.visible; }

-            set

-            {

-                this.visible = value;

-                Logger.Log("BuildAdvanced->Visible = " + value);

-            }

-        }

-

-        /// <summary>

-        ///     Gets and sets whether to show in compact mode.

-        /// </summary>

-        public bool CompactMode

-        {

-            get { return this.compactMode; }

-            set

-            {

-                this.compactMode = value;

-                Logger.Log("BuildAdvanced->CompactMode = " + value);

-            }

-        }

-

-        /// <summary>

-        ///     Gets and sets whether to show all stages.

-        /// </summary>

-        public bool ShowAllStages

-        {

-            get { return this.showAllStages; }

-            set

-            {

-                this.showAllStages = value;

-                Logger.Log("BuildAdvanced->ShowAllStages = " + value);

-            }

-        }

-

-        /// <summary>

-        ///     Gets and sets whether to use atmospheric details.

-        /// </summary>

-        public bool ShowAtmosphericDetails

-        {

-            get { return this.showAtmosphericDetails; }

-            set

-            {

-                this.showAtmosphericDetails = value;

-                Logger.Log("BuildAdvanced->ShowAtmosphericDetails = " + value);

-            }

-        }

-

-        /// <summary>

-        ///     Gets and sets whether to show the reference body selection.

-        /// </summary>

-        public bool ShowReferenceBodies

-        {

-            get { return this.showReferenceBodies; }

-            set

-            {

-                this.showReferenceBodies = value;

-                Logger.Log("BuildAdvanced->ShowReferenceBodies = " + value);

-            }

-        }

-

-        public bool ShowSettings

-        {

-            get { return this.showSettings; }

-            set

-            {

-                this.showSettings = value;

-                Logger.Log("BuildAdvanced->ShowSettings = " + value);

-            }

-        }

-

-        #endregion

-

-        #region Initialisation

-

-        private void Awake()

-        {

-            Instance = this;

-            this.Load();

-        }

-

-        private void Start()

-        {

-            this.windowId = this.GetHashCode();

-            this.InitialiseStyles();

-            RenderingManager.AddToPostDrawQueue(0, this.OnDraw);

-            GuiDisplaySize.OnSizeChanged += this.OnSizeChanged;

-        }

-

-        /// <summary>

-        ///     Initialises all the styles that are required.

-        /// </summary>

-        private void InitialiseStyles()

-        {

-            try

-            {

-                this.windowStyle = new GUIStyle(HighLogic.Skin.window)

-                {

-                    alignment = TextAnchor.UpperLeft

-                };

-

-                this.areaStyle = new GUIStyle(HighLogic.Skin.box)

-                {

-                    padding = new RectOffset(0, 0, 9, 0)

-                };

-

-                this.areaBodiesStyle = new GUIStyle(HighLogic.Skin.box)

-                {

-                    padding = new RectOffset()

-                };

-

-                this.areaSettingStyle = new GUIStyle(HighLogic.Skin.box)

-                {

-                    padding = new RectOffset(10, 10, 10, 10)

-                };

-

-                this.buttonStyle = new GUIStyle(HighLogic.Skin.button)

-                {

-                    normal =

-                    {

-                        textColor = Color.white

-                    },

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    alignment = TextAnchor.MiddleCenter

-                };

-

-                this.titleStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    normal =

-                    {

-                        textColor = Color.white

-                    },

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    alignment = TextAnchor.MiddleCenter,

-                    stretchWidth = true,

-                };

-

-                this.infoStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    alignment = TextAnchor.MiddleCenter,

-                    stretchWidth = true

-                };

-

-                this.settingStyle = new GUIStyle(this.titleStyle)

-                {

-                    alignment = TextAnchor.MiddleLeft,

-                    stretchWidth = true,

-                    stretchHeight = true

-                };

-

-                this.settingAtmoStyle = new GUIStyle(this.titleStyle)

-                {

-                    margin = new RectOffset(),

-                    padding = new RectOffset(),

-                    alignment = TextAnchor.UpperLeft

-                };

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->InitialiseStyles");

-            }

-        }

-

-        private void OnSizeChanged()

-        {

-            this.InitialiseStyles();

-            this.hasChanged = true;

-        }

-

-        #endregion

-

-        #region Update and Drawing

-

-        private void Update()

-        {

-            try

-            {

-                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0)

-                {

-                    return;

-                }

-

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

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

-

-                if (this.showAtmosphericDetails)

-                {

-                    SimManager.Atmosphere = CelestialBodies.Instance.SelectedBodyInfo.Atmosphere * 0.01d * this.atmosphericPercentage;

-                }

-                else

-                {

-                    SimManager.Atmosphere = 0;

-                }

-

-                SimManager.Velocity = this.atmosphericVelocity;

-                SimManager.TryStartSimulation();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->Update");

-            }

-        }

-

-        private void OnDraw()

-        {

-            try

-            {

-                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0)

-                {

-                    return;

-                }

-

-                if (SimManager.ResultsReady())

-                {

-                    this.stages = SimManager.Stages;

-                }

-

-                SimManager.RequestSimulation();

-

-                if (this.stages == null)

-                {

-                    return;

-                }

-

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

-                var title = !this.compactMode ? "KERBAL ENGINEER REDUX " + EngineerGlobals.AssemblyVersion : "K.E.R. " + EngineerGlobals.AssemblyVersion;

-

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

-                var stageCount = this.stages.Count(stage => this.showAllStages || stage.deltaV > 0);

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

-                {

-                    this.hasChanged = false;

-                    this.numberOfStages = stageCount;

-

-                    this.windowPosition.width = 0;

-                    this.windowPosition.height = 0;

-                }

-

-                GUI.skin = null;

-                this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, title, this.windowStyle).ClampToScreen();

-

-                if (this.compactCheck > 0 && this.compactCollapseRight)

-                {

-                    this.windowPosition.x = this.compactRight - this.windowPosition.width;

-                    this.compactCheck--;

-                }

-                else if (this.compactCheck > 0)

-                {

-                    this.compactCheck = 0;

-                }

-

-                // Check editor lock to manage click-through.

-                this.CheckEditorLock();

-                

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->OnDraw");

-            }

-        }

-

-        /// <summary>

-        ///     Checks whether the editor should be locked to stop click-through.

-        /// </summary>

-        private void CheckEditorLock()

-        {

-            try

-            {

-                if (this.windowPosition.MouseIsOver())

-                {

-                    EditorLogic.fetch.State = EditorLogic.EditorState.GUI_SELECTED;

-                    this.isEditorLocked = true;

-                }

-                else if (!this.windowPosition.MouseIsOver() && this.isEditorLocked)

-                {

-                    EditorLogic.fetch.State = EditorLogic.EditorState.PAD_UNSELECTED;

-                    this.isEditorLocked = false;

-                }

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->CheckEditorLock");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the OnGUI window.

-        /// </summary>

-        private void Window(int windowId)

-        {

-            try

-            {

-                // Draw the compact mode toggle.

-                if (GUI.Toggle(new Rect(this.windowPosition.width - 70.0f * GuiDisplaySize.Offset, 5.0f, 65.0f * GuiDisplaySize.Offset, 20.0f), this.compactMode, "COMPACT", this.buttonStyle) != this.compactMode)

-                {

-                    this.hasChanged = true;

-                    this.compactCheck = 2;

-                    this.compactRight = this.windowPosition.xMax;

-                    this.compactMode = !this.compactMode;

-                }

-

-                // When not in compact mode draw the 'All Stages' and 'Atmospheric' toggles.

-                if (!this.compactMode)

-                {

-                    if (GUI.Toggle(new Rect(this.windowPosition.width - 143.0f * GuiDisplaySize.Offset, 5.0f, 70.0f * GuiDisplaySize.Offset, 20.0f), this.showSettings, "SETTINGS", this.buttonStyle) != this.showSettings)

-                    {

-                        this.hasChanged = true;

-                        this.showSettings = !this.showSettings;

-                    }

-

-                    if (GUI.Toggle(new Rect(this.windowPosition.width - 226.0f * GuiDisplaySize.Offset, 5.0f, 80.0f * GuiDisplaySize.Offset, 20.0f), this.showAllStages, "ALL STAGES", this.buttonStyle) != this.showAllStages)

-                    {

-                        this.hasChanged = true;

-                        this.showAllStages = !this.showAllStages;

-                    }

-

-                    if (GUI.Toggle(new Rect(this.windowPosition.width - 324.0f * GuiDisplaySize.Offset, 5.0f, 95.0f * GuiDisplaySize.Offset, 20.0f), this.showAtmosphericDetails, "ATMOSPHERIC", this.buttonStyle) != this.showAtmosphericDetails)

-                    {

-                        this.hasChanged = true;

-                        this.showAtmosphericDetails = !this.showAtmosphericDetails;

-                    }

-

-                    if (GUI.Toggle(new Rect(this.windowPosition.width - 452.0f * GuiDisplaySize.Offset, 5.0f, 125.0f * GuiDisplaySize.Offset, 20.0f), this.showReferenceBodies, "REFERENCE BODIES", this.buttonStyle) != this.showReferenceBodies)

-                    {

-                        this.hasChanged = true;

-                        this.showReferenceBodies = !this.showReferenceBodies;

-                    }

-                }

-

-                // Draw the main informational display box.

-

-                if (!this.compactMode)

-                {

-                    GUILayout.BeginHorizontal(this.areaStyle);

-                    this.DrawStageNumbers();

-                    //this.DrawPartCount();

-                    this.DrawCost();

-                    this.DrawMass();

-                    this.DrawIsp();

-                    this.DrawThrust();

-                    this.DrawTwr();

-                    this.DrawDeltaV();

-                    this.DrawBurnTime();

-                    GUILayout.EndHorizontal();

-

-                    if (this.showAtmosphericDetails)

-                    {

-                        GUILayout.BeginVertical(this.areaSettingStyle);

-                        this.DrawAtmosphericDetails();

-                        GUILayout.EndVertical();

-                    }

-

-                    if (this.showReferenceBodies)

-                    {

-                        GUILayout.BeginVertical(this.areaBodiesStyle);

-                        this.DrawReferenceBodies();

-                        GUILayout.EndVertical();

-                    }

-

-                    if (this.showSettings)

-                    {

-                        GUILayout.BeginVertical(this.areaSettingStyle);

-                        this.DrawSettings();

-                        GUILayout.EndVertical();

-                    }

-                }

-                else // Draw only a few details when in compact mode.

-                {

-                    GUILayout.BeginHorizontal(this.areaStyle);

-                    this.DrawStageNumbers();

-                    this.DrawTwr();

-                    this.DrawDeltaV();

-                    GUILayout.EndHorizontal();

-                }

-

-                GUI.DragWindow();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->Window");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the atmospheric settings.

-        /// </summary>

-        private void DrawAtmosphericDetails()

-        {

-            try

-            {

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("Pressure: " + (this.atmosphericPercentage * 100.0f).ToString("F1") + "%", this.settingAtmoStyle, GUILayout.Width(125.0f * GuiDisplaySize.Offset));

-                GUI.skin = HighLogic.Skin;

-                GUILayout.BeginVertical();

-                GUILayout.FlexibleSpace();

-                this.atmosphericPercentage = GUILayout.HorizontalSlider(this.atmosphericPercentage, 0, 1.0f);

-                GUILayout.FlexibleSpace();

-                GUILayout.EndVertical();

-                GUI.skin = null;

-                GUILayout.EndHorizontal();

-

-                GUILayout.Space(5.0f);

-

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("Velocity: " + this.atmosphericVelocity.ToString("F1") + "m/s", this.settingAtmoStyle, GUILayout.Width(125.0f * GuiDisplaySize.Offset));

-                GUI.skin = HighLogic.Skin;

-                GUILayout.BeginVertical();

-                GUILayout.FlexibleSpace();

-                this.atmosphericVelocity = GUILayout.HorizontalSlider(this.atmosphericVelocity, 0, 2500f);

-                GUILayout.FlexibleSpace();

-                GUILayout.EndVertical();

-                GUI.skin = null;

-                GUILayout.EndHorizontal();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawAtmosphericDetails");

-            }

-        }

-

-        /// <summary>

-        ///     Draws all the reference bodies.

-        /// </summary>

-        private void DrawReferenceBodies()

-        {

-            try

-            {

-                var index = 0;

-

-                foreach (var bodyName in CelestialBodies.Instance.BodyList.Keys)

-                {

-                    if (index % 8 == 0)

-                    {

-                        if (index > 0)

-                        {

-                            GUILayout.EndHorizontal();

-                        }

-                        GUILayout.BeginHorizontal();

-                    }

-                    if (GUILayout.Toggle(CelestialBodies.Instance.SelectedBodyName == bodyName, bodyName, this.buttonStyle))

-                    {

-                        CelestialBodies.Instance.SelectedBodyName = bodyName;

-                    }

-                    index++;

-                }

-                GUILayout.EndHorizontal();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawReferenceBodies");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the settings panel.

-        /// </summary>

-        private void DrawSettings()

-        {

-            try

-            {

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("Compact mode collapses to the:", this.settingStyle);

-                this.compactCollapseRight = !GUILayout.Toggle(!this.compactCollapseRight, "LEFT", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                this.compactCollapseRight = GUILayout.Toggle(this.compactCollapseRight, "RIGHT", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                GUILayout.EndHorizontal();

-

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("Build Engineer Overlay:", this.settingStyle);

-                BuildOverlay.Instance.Visible = GUILayout.Toggle(BuildOverlay.Instance.Visible, "ENABLED", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                BuildOverlay.Instance.Visible = !GUILayout.Toggle(!BuildOverlay.Instance.Visible, "DISABLED", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                GUILayout.EndHorizontal();

-

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("Flight Engineer activation mode:", this.settingStyle);

-                FlightEngineerPartless.IsPartless = GUILayout.Toggle(FlightEngineerPartless.IsPartless, "PARTLESS", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                FlightEngineerPartless.IsPartless = !GUILayout.Toggle(!FlightEngineerPartless.IsPartless, "MODULE", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                GUILayout.EndHorizontal();

-

-                GUILayout.BeginHorizontal();

-                GUILayout.Label("GUI Size: " + GuiDisplaySize.Increment, this.settingStyle);

-                if (GUILayout.Button("<", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset)))

-                {

-                    GuiDisplaySize.Increment--;

-                }

-                if (GUILayout.Button(">", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset)))

-                {

-                    GuiDisplaySize.Increment++;

-                }

-                GUILayout.EndHorizontal();

-

-                GUILayout.Label("Minimum delay between simulations: " + SimManager.minSimTime + "ms", this.settingStyle);

-                GUI.skin = HighLogic.Skin;

-                SimManager.minSimTime = (long)GUILayout.HorizontalSlider(SimManager.minSimTime, 0, 2000.0f);

-                GUI.skin = null;

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawSettings");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the stage number column.

-        /// </summary>

-        private void DrawStageNumbers()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(30.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label("S" + stage.number, this.titleStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawStageNumbers");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the part count column.

-        /// </summary>

-        private void DrawPartCount()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(50.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        //GUILayout.Label(stage.PartCount.ToString("N0"), this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawPartCount");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the cost column.

-        /// </summary>

-        private void DrawCost()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(110.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.cost.ToString("N0") + " / " + stage.totalCost.ToString("N0"), this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawCost");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the mass column.

-        /// </summary>

-        private void DrawMass()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(110.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.mass.ToMass(false) + " / " + stage.totalMass.ToMass(), this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawMass");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the specific impluse column.

-        /// </summary>

-        private void DrawIsp()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.isp.ToString("F1") + "s", this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawIsp");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the thrust column.

-        /// </summary>

-        private void DrawThrust()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.thrust.ToForce(), this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawThrust");

-            }

-        }

-

-        /// <summary>

-        ///     Drwas the thrust to weight ratio column.

-        /// </summary>

-        private void DrawTwr()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.thrustToWeight.ToString("F2") + " (" + stage.maxThrustToWeight.ToString("F2") + ")", this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawTwr");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the deltaV column.

-        /// </summary>

-        private void DrawDeltaV()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.deltaV.ToString("N0") + " / " + stage.inverseTotalDeltaV.ToString("N0") + "m/s", this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawDeltaV");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the burn time column.

-        /// </summary>

-        private void DrawBurnTime()

-        {

-            try

-            {

-                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));

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

-                foreach (var stage in this.stages)

-                {

-                    if (this.showAllStages || stage.deltaV > 0)

-                    {

-                        GUILayout.Label(stage.time.ToTime(), this.infoStyle);

-                    }

-                }

-                GUILayout.EndVertical();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->DrawBurnTime");

-            }

-        }

-

-        #endregion

-

-        #region Save and Load

-

-        /// <summary>

-        ///     Saves the settings when this object is destroyed.

-        /// </summary>

-        private void OnDestroy()

-        {

-            try

-            {

-                var handler = new SettingHandler();

-                handler.Set("visible", this.visible);

-                handler.Set("windowPositionX", this.windowPosition.x);

-                handler.Set("windowPositionY", this.windowPosition.y);

-                handler.Set("compactMode", this.compactMode);

-                handler.Set("compactCollapseRight", this.compactCollapseRight);

-                handler.Set("showAllStages", this.showAllStages);

-                handler.Set("showAtmosphericDetails", this.showAtmosphericDetails);

-                handler.Set("showReferenceBodies", this.showReferenceBodies);

-                handler.Set("showSettings", this.showSettings);

-                handler.Set("selectedBodyName", CelestialBodies.Instance.SelectedBodyName);

-                handler.Save("BuildAdvanced.xml");

-                GuiDisplaySize.OnSizeChanged -= this.OnSizeChanged;

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->OnDestroy");

-            }

-        }

-

-        /// <summary>

-        ///     Loads the settings when this object is created.

-        /// </summary>

-        private void Load()

-        {

-            try

-            {

-                var handler = SettingHandler.Load("BuildAdvanced.xml");

-                handler.Get("visible", ref this.visible);

-                this.windowPosition.x = handler.Get("windowPositionX", this.windowPosition.x);

-                this.windowPosition.y = handler.Get("windowPositionY", this.windowPosition.y);

-                handler.Get("compactMode", ref this.compactMode);

-                handler.Get("compactCollapseRight", ref this.compactCollapseRight);

-                handler.Get("showAllStages", ref this.showAllStages);

-                handler.Get("showAtmosphericDetails", ref this.showAtmosphericDetails);

-                handler.Get("showSettings", ref this.showSettings);

-                CelestialBodies.Instance.SelectedBodyName = handler.Get("selectedBodyName", CelestialBodies.Instance.SelectedBodyName);

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildAdvanced->Load");

-            }

-        }

-

-        #endregion

-    }

+// 
+//     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 System.Linq;
+
+using KerbalEngineer.Extensions;
+using KerbalEngineer.Flight;
+using KerbalEngineer.Settings;
+using KerbalEngineer.VesselSimulator;
+
+using UnityEngine;
+
+#endregion
+
+namespace KerbalEngineer.Editor
+{
+    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
+    public class BuildAdvanced : MonoBehaviour
+    {
+        #region Instance
+
+        /// <summary>
+        ///     Gets the current instance if started or returns null.
+        /// </summary>
+        public static BuildAdvanced Instance { get; private set; }
+
+        #endregion
+
+        #region Fields
+
+        private float atmosphericPercentage = 1.0f;
+        private float atmosphericVelocity;
+        private BuildBodiesList bodiesList;
+        private int compactCheck;
+        private bool compactCollapseRight;
+        private float compactRight;
+        private bool hasChanged;
+        private bool isEditorLocked;
+        private int numberOfStages;
+        private Rect referenceBodiesButtonRect;
+        private Stage[] stages;
+        private int windowId;
+        private Rect windowPosition = new Rect(265.0f, 45.0f, 0, 0);
+
+        #region Styles
+
+        private GUIStyle areaBodiesStyle;
+        private GUIStyle areaSettingStyle;
+        private GUIStyle areaStyle;
+        private GUIStyle buttonStyle;
+        private GUIStyle infoStyle;
+        private GUIStyle settingAtmoStyle;
+        private GUIStyle settingStyle;
+        private GUIStyle titleStyle;
+        private GUIStyle windowStyle;
+
+        #endregion
+
+        #endregion
+
+        #region Properties
+
+        private bool compactMode;
+        private bool showAllStages;
+        private bool showAtmosphericDetails;
+        private bool showReferenceBodies;
+        private bool showSettings;
+        private bool visible = true;
+
+        /// <summary>
+        ///     Gets and sets whether the display is enabled.
+        /// </summary>
+        public bool Visible
+        {
+            get { return this.visible; }
+            set
+            {
+                this.visible = value;
+                Logger.Log("BuildAdvanced->Visible = " + value);
+            }
+        }
+
+        /// <summary>
+        ///     Gets and sets whether to show in compact mode.
+        /// </summary>
+        public bool CompactMode
+        {
+            get { return this.compactMode; }
+            set
+            {
+                this.compactMode = value;
+                Logger.Log("BuildAdvanced->CompactMode = " + value);
+            }
+        }
+
+        /// <summary>
+        ///     Gets and sets whether to show all stages.
+        /// </summary>
+        public bool ShowAllStages
+        {
+            get { return this.showAllStages; }
+            set
+            {
+                this.showAllStages = value;
+                Logger.Log("BuildAdvanced->ShowAllStages = " + value);
+            }
+        }
+
+        /// <summary>
+        ///     Gets and sets whether to use atmospheric details.
+        /// </summary>
+        public bool ShowAtmosphericDetails
+        {
+            get { return this.showAtmosphericDetails; }
+            set
+            {
+                this.showAtmosphericDetails = value;
+                Logger.Log("BuildAdvanced->ShowAtmosphericDetails = " + value);
+            }
+        }
+
+        /// <summary>
+        ///     Gets and sets whether to show the reference body selection.
+        /// </summary>
+        public bool ShowReferenceBodies
+        {
+            get { return this.showReferenceBodies; }
+            set
+            {
+                this.showReferenceBodies = value;
+                Logger.Log("BuildAdvanced->ShowReferenceBodies = " + value);
+            }
+        }
+
+        public bool ShowSettings
+        {
+            get { return this.showSettings; }
+            set
+            {
+                this.showSettings = value;
+                Logger.Log("BuildAdvanced->ShowSettings = " + value);
+            }
+        }
+
+        #endregion
+
+        #region Initialisation
+
+        private void Awake()
+        {
+            Instance = this;
+            this.bodiesList = this.gameObject.AddComponent<BuildBodiesList>();
+            this.Load();
+        }
+
+        private void Start()
+        {
+            this.windowId = this.GetHashCode();
+            this.InitialiseStyles();
+            GuiDisplaySize.OnSizeChanged += this.OnSizeChanged;
+        }
+
+        /// <summary>
+        ///     Initialises all the styles that are required.
+        /// </summary>
+        private void InitialiseStyles()
+        {
+            try
+            {
+                this.windowStyle = new GUIStyle(HighLogic.Skin.window)
+                {
+                    alignment = TextAnchor.UpperLeft
+                };
+
+                this.areaStyle = new GUIStyle(HighLogic.Skin.box)
+                {
+                    padding = new RectOffset(0, 0, 9, 0)
+                };
+
+                this.areaBodiesStyle = new GUIStyle(HighLogic.Skin.box)
+                {
+                    padding = new RectOffset()
+                };
+
+                this.areaSettingStyle = new GUIStyle(HighLogic.Skin.box)
+                {
+                    padding = new RectOffset(10, 10, 10, 10)
+                };
+
+                this.buttonStyle = new GUIStyle(HighLogic.Skin.button)
+                {
+                    normal =
+                    {
+                        textColor = Color.white
+                    },
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    alignment = TextAnchor.MiddleCenter
+                };
+
+                this.titleStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    normal =
+                    {
+                        textColor = Color.white
+                    },
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    alignment = TextAnchor.MiddleCenter,
+                    stretchWidth = true,
+                };
+
+                this.infoStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    alignment = TextAnchor.MiddleCenter,
+                    stretchWidth = true
+                };
+
+                this.settingStyle = new GUIStyle(this.titleStyle)
+                {
+                    alignment = TextAnchor.MiddleLeft,
+                    stretchWidth = true,
+                    stretchHeight = true
+                };
+
+                this.settingAtmoStyle = new GUIStyle(this.titleStyle)
+                {
+                    margin = new RectOffset(),
+                    padding = new RectOffset(),
+                    alignment = TextAnchor.UpperLeft
+                };
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->InitialiseStyles");
+            }
+        }
+
+        private void OnSizeChanged()
+        {
+            this.InitialiseStyles();
+            this.hasChanged = true;
+        }
+
+        #endregion
+
+        #region Update and Drawing
+
+        private void Update()
+        {
+            try
+            {
+                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0)
+                {
+                    this.bodiesList.enabled = false;
+                    return;
+                }
+
+                this.bodiesList.enabled = this.showReferenceBodies;
+                this.bodiesList.SetPosition(this.referenceBodiesButtonRect.x + this.windowPosition.x, this.referenceBodiesButtonRect.y + this.referenceBodiesButtonRect.height + this.windowPosition.y, this.referenceBodiesButtonRect.width);
+
+                // Configure the simulation parameters based on the selected reference body.
+                SimManager.Gravity = CelestialBodies.SelectedBody.Gravity;
+
+                if (this.showAtmosphericDetails)
+                {
+                    SimManager.Atmosphere = CelestialBodies.SelectedBody.Atmosphere * 0.01d * this.atmosphericPercentage;
+                }
+                else
+                {
+                    SimManager.Atmosphere = 0;
+                }
+
+                SimManager.Velocity = this.atmosphericVelocity;
+                SimManager.TryStartSimulation();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->Update");
+            }
+        }
+
+        private void OnGUI()
+        {
+            try
+            {
+                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0)
+                {
+                    return;
+                }
+
+                if (SimManager.ResultsReady())
+                {
+                    this.stages = SimManager.Stages;
+                }
+
+                SimManager.RequestSimulation();
+
+                if (this.stages == null)
+                {
+                    return;
+                }
+
+                // Change the window title based on whether in compact mode or not.
+                var title = !this.compactMode ? "KERBAL ENGINEER REDUX " + EngineerGlobals.AssemblyVersion : "K.E.R. " + EngineerGlobals.AssemblyVersion;
+
+                // Reset the window size when the staging or something else has changed.
+                var stageCount = this.stages.Count(stage => this.showAllStages || stage.deltaV > 0);
+                if (this.hasChanged || stageCount != this.numberOfStages)
+                {
+                    this.hasChanged = false;
+                    this.numberOfStages = stageCount;
+
+                    this.windowPosition.width = 0;
+                    this.windowPosition.height = 0;
+                }
+
+                GUI.skin = null;
+                this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, title, this.windowStyle).ClampToScreen();
+
+                if (this.compactCheck > 0 && this.compactCollapseRight)
+                {
+                    this.windowPosition.x = this.compactRight - this.windowPosition.width;
+                    this.compactCheck--;
+                }
+                else if (this.compactCheck > 0)
+                {
+                    this.compactCheck = 0;
+                }
+
+                // Check editor lock to manage click-through.
+                this.CheckEditorLock();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->OnDraw");
+            }
+        }
+
+        /// <summary>
+        ///     Checks whether the editor should be locked to stop click-through.
+        /// </summary>
+        private void CheckEditorLock()
+        {
+            try
+            {
+                if ((this.windowPosition.MouseIsOver() || this.bodiesList.Position.MouseIsOver()) && this.isEditorLocked == false)
+                {
+                    EditorLogic.fetch.State = EditorLogic.EditorState.GUI_SELECTED;
+                    this.isEditorLocked = true;
+                }
+                else if (!this.windowPosition.MouseIsOver() && !this.bodiesList.Position.MouseIsOver() && this.isEditorLocked)
+                {
+                    EditorLogic.fetch.State = EditorLogic.EditorState.PAD_UNSELECTED;
+                    this.isEditorLocked = false;
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->CheckEditorLock");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the OnGUI window.
+        /// </summary>
+        private void Window(int windowId)
+        {
+            try
+            {
+                // Draw the compact mode toggle.
+                if (GUI.Toggle(new Rect(this.windowPosition.width - 70.0f * GuiDisplaySize.Offset, 5.0f, 65.0f * GuiDisplaySize.Offset, 20.0f), this.compactMode, "COMPACT", this.buttonStyle) != this.compactMode)
+                {
+                    this.hasChanged = true;
+                    this.compactCheck = 2;
+                    this.compactRight = this.windowPosition.xMax;
+                    this.compactMode = !this.compactMode;
+                }
+
+                // When not in compact mode draw the 'All Stages' and 'Atmospheric' toggles.
+                if (!this.compactMode)
+                {
+                    if (GUI.Toggle(new Rect(this.windowPosition.width - 143.0f * GuiDisplaySize.Offset, 5.0f, 70.0f * GuiDisplaySize.Offset, 20.0f), this.showSettings, "SETTINGS", this.buttonStyle) != this.showSettings)
+                    {
+                        this.hasChanged = true;
+                        this.showSettings = !this.showSettings;
+                    }
+
+                    if (GUI.Toggle(new Rect(this.windowPosition.width - 226.0f * GuiDisplaySize.Offset, 5.0f, 80.0f * GuiDisplaySize.Offset, 20.0f), this.showAllStages, "ALL STAGES", this.buttonStyle) != this.showAllStages)
+                    {
+                        this.hasChanged = true;
+                        this.showAllStages = !this.showAllStages;
+                    }
+
+                    if (GUI.Toggle(new Rect(this.windowPosition.width - 324.0f * GuiDisplaySize.Offset, 5.0f, 95.0f * GuiDisplaySize.Offset, 20.0f), this.showAtmosphericDetails, "ATMOSPHERIC", this.buttonStyle) != this.showAtmosphericDetails)
+                    {
+                        this.hasChanged = true;
+                        this.showAtmosphericDetails = !this.showAtmosphericDetails;
+                    }
+
+                    this.referenceBodiesButtonRect = new Rect(this.windowPosition.width - 452.0f * GuiDisplaySize.Offset, 5.0f, 125.0f * GuiDisplaySize.Offset, 20.0f);
+                    if (GUI.Toggle(this.referenceBodiesButtonRect, this.showReferenceBodies, "REFERENCE BODIES", this.buttonStyle) != this.showReferenceBodies)
+                    {
+                        this.hasChanged = true;
+                        this.showReferenceBodies = !this.showReferenceBodies;
+                    }
+                }
+
+                // Draw the main informational display box.
+                if (!this.compactMode)
+                {
+                    GUILayout.BeginHorizontal(this.areaStyle);
+                    this.DrawStageNumbers();
+                    //this.DrawPartCount();
+                    this.DrawCost();
+                    this.DrawMass();
+                    this.DrawIsp();
+                    this.DrawThrust();
+                    this.DrawTwr();
+                    this.DrawDeltaV();
+                    this.DrawBurnTime();
+                    GUILayout.EndHorizontal();
+
+                    if (this.showAtmosphericDetails)
+                    {
+                        GUILayout.BeginVertical(this.areaSettingStyle);
+                        this.DrawAtmosphericDetails();
+                        GUILayout.EndVertical();
+                    }
+
+                    if (this.showSettings)
+                    {
+                        GUILayout.BeginVertical(this.areaSettingStyle);
+                        this.DrawSettings();
+                        GUILayout.EndVertical();
+                    }
+                }
+                else // Draw only a few details when in compact mode.
+                {
+                    GUILayout.BeginHorizontal(this.areaStyle);
+                    this.DrawStageNumbers();
+                    this.DrawTwr();
+                    this.DrawDeltaV();
+                    GUILayout.EndHorizontal();
+                }
+
+                GUI.DragWindow();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->Window");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the atmospheric settings.
+        /// </summary>
+        private void DrawAtmosphericDetails()
+        {
+            try
+            {
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("Pressure: " + (this.atmosphericPercentage * 100.0f).ToString("F1") + "%", this.settingAtmoStyle, GUILayout.Width(125.0f * GuiDisplaySize.Offset));
+                GUI.skin = HighLogic.Skin;
+                GUILayout.BeginVertical();
+                GUILayout.FlexibleSpace();
+                this.atmosphericPercentage = GUILayout.HorizontalSlider(this.atmosphericPercentage, 0, 1.0f);
+                GUILayout.FlexibleSpace();
+                GUILayout.EndVertical();
+                GUI.skin = null;
+                GUILayout.EndHorizontal();
+
+                GUILayout.Space(5.0f);
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("Velocity: " + this.atmosphericVelocity.ToString("F1") + "m/s", this.settingAtmoStyle, GUILayout.Width(125.0f * GuiDisplaySize.Offset));
+                GUI.skin = HighLogic.Skin;
+                GUILayout.BeginVertical();
+                GUILayout.FlexibleSpace();
+                this.atmosphericVelocity = GUILayout.HorizontalSlider(this.atmosphericVelocity, 0, 2500f);
+                GUILayout.FlexibleSpace();
+                GUILayout.EndVertical();
+                GUI.skin = null;
+                GUILayout.EndHorizontal();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawAtmosphericDetails");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the settings panel.
+        /// </summary>
+        private void DrawSettings()
+        {
+            try
+            {
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("Compact mode collapses to the:", this.settingStyle);
+                this.compactCollapseRight = !GUILayout.Toggle(!this.compactCollapseRight, "LEFT", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                this.compactCollapseRight = GUILayout.Toggle(this.compactCollapseRight, "RIGHT", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                GUILayout.EndHorizontal();
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("Build Engineer Overlay:", this.settingStyle);
+                BuildOverlay.Instance.Visible = GUILayout.Toggle(BuildOverlay.Instance.Visible, "ENABLED", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                BuildOverlay.Instance.Visible = !GUILayout.Toggle(!BuildOverlay.Instance.Visible, "DISABLED", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                GUILayout.EndHorizontal();
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("Flight Engineer activation mode:", this.settingStyle);
+                FlightEngineerPartless.IsPartless = GUILayout.Toggle(FlightEngineerPartless.IsPartless, "PARTLESS", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                FlightEngineerPartless.IsPartless = !GUILayout.Toggle(!FlightEngineerPartless.IsPartless, "MODULE", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                GUILayout.EndHorizontal();
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Label("GUI Size: " + GuiDisplaySize.Increment, this.settingStyle);
+                if (GUILayout.Button("<", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset)))
+                {
+                    GuiDisplaySize.Increment--;
+                }
+                if (GUILayout.Button(">", this.buttonStyle, GUILayout.Width(100.0f * GuiDisplaySize.Offset)))
+                {
+                    GuiDisplaySize.Increment++;
+                }
+                GUILayout.EndHorizontal();
+
+                GUILayout.Label("Minimum delay between simulations: " + SimManager.minSimTime + "ms", this.settingStyle);
+                GUI.skin = HighLogic.Skin;
+                SimManager.minSimTime = (long)GUILayout.HorizontalSlider(SimManager.minSimTime, 0, 2000.0f);
+                GUI.skin = null;
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawSettings");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the stage number column.
+        /// </summary>
+        private void DrawStageNumbers()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(30.0f * GuiDisplaySize.Offset));
+                GUILayout.Label(string.Empty, this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label("S" + stage.number, this.titleStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawStageNumbers");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the part count column.
+        /// </summary>
+        private void DrawPartCount()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(50.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("PARTS", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        //GUILayout.Label(stage.PartCount.ToString("N0"), this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawPartCount");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the cost column.
+        /// </summary>
+        private void DrawCost()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(110.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("COST", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.cost.ToString("N0") + " / " + stage.totalCost.ToString("N0"), this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawCost");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the mass column.
+        /// </summary>
+        private void DrawMass()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(110.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("MASS", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.mass.ToMass(false) + " / " + stage.totalMass.ToMass(), this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawMass");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the specific impluse column.
+        /// </summary>
+        private void DrawIsp()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("ISP", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.isp.ToString("F1") + "s", this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawIsp");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the thrust column.
+        /// </summary>
+        private void DrawThrust()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("THRUST", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.thrust.ToForce(), this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawThrust");
+            }
+        }
+
+        /// <summary>
+        ///     Drwas the thrust to weight ratio column.
+        /// </summary>
+        private void DrawTwr()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("TWR (MAX)", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.thrustToWeight.ToString("F2") + " (" + stage.maxThrustToWeight.ToString("F2") + ")", this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawTwr");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the deltaV column.
+        /// </summary>
+        private void DrawDeltaV()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("DELTA-V", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.deltaV.ToString("N0") + " / " + stage.inverseTotalDeltaV.ToString("N0") + "m/s", this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawDeltaV");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the burn time column.
+        /// </summary>
+        private void DrawBurnTime()
+        {
+            try
+            {
+                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));
+                GUILayout.Label("BURN", this.titleStyle);
+                foreach (var stage in this.stages)
+                {
+                    if (this.showAllStages || stage.deltaV > 0)
+                    {
+                        GUILayout.Label(stage.time.ToTime(), this.infoStyle);
+                    }
+                }
+                GUILayout.EndVertical();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->DrawBurnTime");
+            }
+        }
+
+        #endregion
+
+        #region Save and Load
+
+        /// <summary>
+        ///     Saves the settings when this object is destroyed.
+        /// </summary>
+        private void OnDestroy()
+        {
+            try
+            {
+                var handler = new SettingHandler();
+                handler.Set("visible", this.visible);
+                handler.Set("windowPositionX", this.windowPosition.x);
+                handler.Set("windowPositionY", this.windowPosition.y);
+                handler.Set("compactMode", this.compactMode);
+                handler.Set("compactCollapseRight", this.compactCollapseRight);
+                handler.Set("showAllStages", this.showAllStages);
+                handler.Set("showAtmosphericDetails", this.showAtmosphericDetails);
+                handler.Set("showReferenceBodies", this.showReferenceBodies);
+                handler.Set("showSettings", this.showSettings);
+                handler.Set("selectedBodyName", CelestialBodies.SelectedBody.Name);
+                handler.Save("BuildAdvanced.xml");
+                GuiDisplaySize.OnSizeChanged -= this.OnSizeChanged;
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->OnDestroy");
+            }
+        }
+
+        /// <summary>
+        ///     Loads the settings when this object is created.
+        /// </summary>
+        private void Load()
+        {
+            try
+            {
+                var handler = SettingHandler.Load("BuildAdvanced.xml");
+                handler.Get("visible", ref this.visible);
+                this.windowPosition.x = handler.Get("windowPositionX", this.windowPosition.x);
+                this.windowPosition.y = handler.Get("windowPositionY", this.windowPosition.y);
+                handler.Get("compactMode", ref this.compactMode);
+                handler.Get("compactCollapseRight", ref this.compactCollapseRight);
+                handler.Get("showAllStages", ref this.showAllStages);
+                handler.Get("showAtmosphericDetails", ref this.showAtmosphericDetails);
+                handler.Get("showSettings", ref this.showSettings);
+                CelestialBodies.SetSelectedBody(handler.Get("selectedBodyName", CelestialBodies.SelectedBody.Name));
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildAdvanced->Load");
+            }
+        }
+
+        #endregion
+    }
 }

--- /dev/null
+++ b/KerbalEngineer/Editor/BuildBodiesList.cs
@@ -1,1 +1,205 @@
-
+// 
+//     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 UnityEngine;
+
+#endregion
+
+namespace KerbalEngineer.Editor
+{
+    public class BuildBodiesList : MonoBehaviour
+    {
+        #region Fields
+
+        private Rect position;
+        private bool resize;
+
+        #endregion
+
+        #region Properties
+
+        public Rect Position
+        {
+            get { return this.position; }
+        }
+
+        #endregion
+
+        #region Initialisation
+
+        private void Awake()
+        {
+            try
+            {
+                this.enabled = false;
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        private void Start()
+        {
+            try
+            {
+                this.InitialiseStyles();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        #endregion
+
+        #region Styles
+
+        private GUIStyle buttonActiveStyle;
+        private GUIStyle buttonStyle;
+        private GUIStyle windowStyle;
+
+        private void InitialiseStyles()
+        {
+            try
+            {
+                this.windowStyle = new GUIStyle(HighLogic.Skin.window)
+                {
+                    margin = new RectOffset(),
+                    padding = new RectOffset(3,3,3,3)
+                };
+
+                this.buttonStyle = new GUIStyle(HighLogic.Skin.button)
+                {
+                    margin = new RectOffset(0,0,2,0),
+                    padding = new RectOffset(5,5,5,5),
+                    normal =
+                    {
+                        textColor = Color.white
+                    },
+                    active =
+                    {
+                        textColor = Color.white
+                    },
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    alignment = TextAnchor.MiddleCenter
+                };
+
+                this.buttonActiveStyle = new GUIStyle(this.buttonStyle)
+                {
+                    normal = this.buttonStyle.active
+                };
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        #endregion
+
+        #region Drawing
+
+        private void OnGUI()
+        {
+            try
+            {
+                if (this.resize)
+                {
+                    this.position.height = 0;
+                    this.resize = false;
+                }
+                GUI.skin = null;
+                this.position = GUILayout.Window(this.GetInstanceID(), this.position, this.Window, string.Empty, this.windowStyle);
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        private void Window(int windowId)
+        {
+            try
+            {
+                GUI.BringWindowToFront(windowId);
+                if (CelestialBodies.SystemBody == CelestialBodies.SelectedBody)
+                {
+                    this.DrawBodies(CelestialBodies.SystemBody);
+                }
+                else
+                {
+                    foreach (var body in CelestialBodies.SystemBody.Children)
+                    {
+                        this.DrawBodies(body);
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        private void DrawBodies(CelestialBodies.BodyInfo bodyInfo, int depth = 0)
+        {
+            GUILayout.BeginHorizontal();
+            GUILayout.Space(20.0f * depth);
+            if (GUILayout.Button(bodyInfo.Children.Count > 0 ? bodyInfo.Name + " [" + bodyInfo.Children.Count + "]" : bodyInfo.Name, bodyInfo.Selected && bodyInfo.SelectedDepth == 0 ? this.buttonActiveStyle : this.buttonStyle))
+            {
+                CelestialBodies.SetSelectedBody(bodyInfo.Name);
+                this.resize = true;
+            }
+            GUILayout.EndHorizontal();
+
+            if (bodyInfo.Selected)
+            {
+                foreach (var body in bodyInfo.Children)
+                {
+                    this.DrawBodies(body, depth + 1);
+                }
+            }
+        }
+
+        #endregion
+
+        #region Public Methods
+
+        public void SetPosition(float x, float y, float width)
+        {
+            try
+            {
+                this.position.x = x;
+                this.position.y = y;
+                this.position.width = width;
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex);
+            }
+        }
+
+        #endregion
+    }
+}

--- a/KerbalEngineer/Editor/BuildOverlay.cs
+++ b/KerbalEngineer/Editor/BuildOverlay.cs
@@ -1,513 +1,513 @@
-// 

-//     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 System.Diagnostics;

-

-using KerbalEngineer.Extensions;

-using KerbalEngineer.Settings;

-using KerbalEngineer.VesselSimulator;

-

-using UnityEngine;

-

-#endregion

-

-namespace KerbalEngineer.Editor

-{

-    [KSPAddon(KSPAddon.Startup.EditorAny, false)]

-    public class BuildOverlay : MonoBehaviour

-    {

-        #region Instance

-

-        /// <summary>

-        ///     Gets the current instance if started or returns null.

-        /// </summary>

-        public static BuildOverlay Instance { get; private set; }

-

-        #endregion

-

-        #region Fields

-

-        private readonly Stopwatch tooltipInfoTimer = new Stopwatch();

-        private Stage lastStage;

-

-        private Part selectedPart;

-        private int windowId;

-        private Rect windowPosition = new Rect(300.0f, 0, 0, 0);

-

-        #endregion

-

-        #region Constructors

-

-        private void Awake()

-        {

-            Instance = this;

-            GuiDisplaySize.OnSizeChanged += this.OnSizeChanged;

-        }

-

-        private void Start()

-        {

-            this.windowId = this.GetHashCode();

-            this.InitialiseStyles();

-            this.Load();

-            RenderingManager.AddToPostDrawQueue(0, this.OnDraw);

-        }

-

-        #endregion

-

-        #region Properties

-

-        private float tooltipInfoDelay = 0.5f;

-        private bool visible = true;

-

-        public float TooltipInfoDelay

-        {

-            get { return this.tooltipInfoDelay; }

-            set

-            {

-                this.tooltipInfoDelay = value;

-                Logger.Log("BuildOverlay->TooltipInfoDelay = " + value);

-            }

-        }

-

-        /// <summary>

-        ///     Gets and sets whether the display is enabled.

-        /// </summary>

-        public bool Visible

-        {

-            get { return this.visible; }

-            set

-            {

-                this.visible = value;

-                Logger.Log("BuildOverlay->Visible = " + value);

-            }

-        }

-

-        #endregion

-

-        #region GUIStyles

-

-        private GUIStyle infoStyle;

-        private GUIStyle titleStyle;

-        private GUIStyle tooltipInfoStyle;

-        private GUIStyle tooltipTitleStyle;

-        private GUIStyle windowStyle;

-

-        private void InitialiseStyles()

-        {

-            try

-            {

-                this.windowStyle = new GUIStyle(GUIStyle.none)

-                {

-                    margin = new RectOffset(),

-                    padding = new RectOffset()

-                };

-

-                this.titleStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    normal =

-                    {

-                        textColor = Color.white

-                    },

-                    margin = new RectOffset(),

-                    padding = new RectOffset(),

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    stretchWidth = true

-                };

-

-                this.infoStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    margin = new RectOffset(),

-                    padding = new RectOffset(),

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    stretchWidth = true

-                };

-

-                this.tooltipTitleStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    normal =

-                    {

-                        textColor = Color.white

-                    },

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    stretchWidth = true

-                };

-

-                this.tooltipInfoStyle = new GUIStyle(HighLogic.Skin.label)

-                {

-                    fontSize = (int)(11 * GuiDisplaySize.Offset),

-                    fontStyle = FontStyle.Bold,

-                    stretchWidth = true

-                };

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->InitialiseStyles");

-            }

-        }

-

-        private void OnSizeChanged()

-        {

-            this.InitialiseStyles();

-            this.windowPosition.width = 0;

-            this.windowPosition.height = 0;

-        }

-

-        #endregion

-

-        #region Update and Drawing

-

-        private void Update()

-        {

-            try

-            {

-                if (!this.visible || BuildAdvanced.Instance == null || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0 || EditorLogic.fetch.editorScreen != EditorLogic.EditorScreen.Parts)

-                {

-                    return;

-                }

-

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

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

-

-                if (BuildAdvanced.Instance.ShowAtmosphericDetails)

-                {

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

-                }

-                else

-                {

-                    SimManager.Atmosphere = 0;

-                }

-

-                SimManager.TryStartSimulation();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->Update");

-            }

-        }

-

-        private void OnDraw()

-        {

-            try

-            {

-                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0 || EditorLogic.fetch.editorScreen != EditorLogic.EditorScreen.Parts)

-                {

-                    return;

-                }

-

-                if (SimManager.ResultsReady())

-                {

-                    this.lastStage = SimManager.LastStage;

-                }

-

-                SimManager.RequestSimulation();

-

-                if (this.lastStage == null)

-                {

-                    return;

-                }

-

-                GUI.skin = null;

-                this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, string.Empty, this.windowStyle);

-

-                // Check and set that the window is at the bottom of the screen.

-                if (this.windowPosition.y + this.windowPosition.height != Screen.height - 5.0f)

-                {

-                    this.windowPosition.y = Screen.height - this.windowPosition.height - 5.0f;

-                }

-

-                // Find if a part is selected or being hovered over.

-                if (EditorLogic.SelectedPart != null)

-                {

-                    // Do not allow the extended information to be shown.

-                    if (this.selectedPart != null)

-                    {

-                        this.selectedPart = null;

-                        this.tooltipInfoTimer.Reset();

-                    }

-

-                    this.DrawTooltip(EditorLogic.SelectedPart);

-                }

-                else

-                {

-                    var isPartSelected = false;

-                    foreach (var part in EditorLogic.SortedShipList)

-                    {

-                        if (part.stackIcon.highlightIcon)

-                        {

-                            // Start the extended information timer.

-                            if (part != this.selectedPart)

-                            {

-                                this.selectedPart = part;

-                                this.tooltipInfoTimer.Reset();

-                                this.tooltipInfoTimer.Start();

-                            }

-                            isPartSelected = true;

-

-                            this.DrawTooltip(part);

-                            break;

-                        }

-                    }

-

-                    // If no part is being hovered over we must reset the extended information timer.

-                    if (!isPartSelected && this.selectedPart != null)

-                    {

-                        this.selectedPart = null;

-                        this.tooltipInfoTimer.Reset();

-                    }

-                }

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->OnDraw");

-            }

-        }

-

-        private void Window(int windowId)

-        {

-            try

-            {

-                GUILayout.BeginHorizontal();

-

-                // Titles

-                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));

-                //GUILayout.Label("Parts:", this.titleStyle);

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

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

-                GUILayout.EndVertical();

-

-                // Details

-                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));

-                //GUILayout.Label(SimulationManager.Instance.LastStage.partCount.ToString("N0"), this.infoStyle);

-                GUILayout.Label(this.lastStage.totalDeltaV.ToString("N0") + " m/s", this.infoStyle);

-                GUILayout.Label(this.lastStage.thrustToWeight.ToString("F2"), this.infoStyle);

-                GUILayout.EndVertical();

-

-                GUILayout.EndHorizontal();

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->Window");

-            }

-        }

-

-        /// <summary>

-        ///     Draws the tooltip details of the selected/highlighted part.

-        /// </summary>

-        private void DrawTooltip(Part part)

-        {

-            try

-            {

-                // Tooltip title (name of part).

-                var content = new GUIContent(part.partInfo.title);

-                var size = this.tooltipTitleStyle.CalcSize(content);

-                var position = new Rect(Event.current.mousePosition.x + 16.0f, Event.current.mousePosition.y, size.x, size.y).ClampInsideScreen();

-

-                if (position.x < Event.current.mousePosition.x + 16.0f)

-                {

-                    position.y += 16.0f;

-                }

-                GUI.Label(position, content, this.tooltipTitleStyle);

-

-                // After hovering for a period of time, show extended information.

-                if (this.tooltipInfoTimer.Elapsed.TotalSeconds >= this.tooltipInfoDelay)

-                {

-                    // Stop the timer as it is no longer needed.

-                    if (this.tooltipInfoTimer.IsRunning)

-                    {

-                        this.tooltipInfoTimer.Stop();

-                    }

-

-                    // Show the dry mass of the part if applicable.

-                    if (part.physicalSignificance == Part.PhysicalSignificance.FULL)

-                    {

-                        this.DrawTooltipInfo(ref position, "Dry Mass: " + part.GetDryMass().ToMass());

-                    }

-

-                    // Show resources contained within the part.

-                    if (part.ContainsResources())

-                    {

-                        // Show the wet mass of the part if applicable.

-                        if (part.GetResourceMass() > 0)

-                        {

-                            this.DrawTooltipInfo(ref position, "Wet Mass: " + part.GetWetMass().ToMass());

-                        }

-

-                        // List all the resources contained within the part.

-                        foreach (PartResource resource in part.Resources)

-                        {

-                            if (resource.GetDensity() > 0)

-                            {

-                                this.DrawTooltipInfo(ref position, resource.info.name + ": " + resource.GetMass().ToMass() + " (" + resource.amount + ")");

-                            }

-                            else

-                            {

-                                this.DrawTooltipInfo(ref position, resource.info.name + ": " + resource.amount);

-                            }

-                        }

-                    }

-

-                    // Show details for engines.

-                    if (part.IsEngine())

-                    {

-                        this.DrawTooltipInfo(ref position, "Maximum Thrust: " + part.GetMaxThrust().ToForce());

-                        this.DrawTooltipInfo(ref position, "Specific Impulse: " + part.GetSpecificImpulse(1f) + " / " + part.GetSpecificImpulse(0f) + "s");

-

-                        // Thrust vectoring.

-                        if (part.HasModule("ModuleGimbal"))

-                        {

-                            this.DrawTooltipInfo(ref position, "Thrust Vectoring Enabled");

-                        }

-

-                        // Contains alternator.

-                        if (part.HasModule("ModuleAlternator"))

-                        {

-                            this.DrawTooltipInfo(ref position, "Contains Alternator");

-                        }

-                    }

-

-                    // Show details for RCS.

-                    if (part.IsRcsModule())

-                    {

-                        var moduleRcs = part.GetModuleRcs();

-                        this.DrawTooltipInfo(ref position, "Thrust Power: " + moduleRcs.thrusterPower.ToDouble().ToForce());

-                        this.DrawTooltipInfo(ref position, "Specific Impulse: " + moduleRcs.atmosphereCurve.Evaluate(1f) + " / " + moduleRcs.atmosphereCurve.Evaluate(0f) + "s");

-                    }

-

-                    // Show details for solar panels.

-                    if (part.IsSolarPanel())

-                    {

-                        this.DrawTooltipInfo(ref position, "Charge Rate: " + part.GetModuleDeployableSolarPanel().chargeRate.ToDouble().ToRate());

-                    }

-

-                    // Show details for generators.

-                    if (part.IsGenerator())

-                    {

-                        foreach (var resource in part.GetModuleGenerator().inputList)

-                        {

-                            this.DrawTooltipInfo(ref position, "Input: " + resource.name + " (" + resource.rate.ToDouble().ToRate() + ")");

-                        }

-

-                        foreach (var resource in part.GetModuleGenerator().outputList)

-                        {

-                            this.DrawTooltipInfo(ref position, "Output: " + resource.name + " (" + resource.rate.ToDouble().ToRate() + ")");

-                        }

-                    }

-

-                    // Show details for parachutes.

-                    if (part.IsParachute())

-                    {

-                        var module = part.GetModuleParachute();

-                        this.DrawTooltipInfo(ref position, "Semi Deployed Drag: " + module.semiDeployedDrag);

-                        this.DrawTooltipInfo(ref position, "Fully Deployed Drag: " + module.fullyDeployedDrag);

-                        this.DrawTooltipInfo(ref position, "Deployment Altitude: " + module.deployAltitude.ToDouble().ToDistance());

-                    }

-

-                    // Contains stability augmentation system.

-                    if (part.HasModule("ModuleSAS"))

-                    {

-                        this.DrawTooltipInfo(ref position, "Contains SAS");

-                    }

-

-                    // Contains reaction wheels.

-                    if (part.HasModule("ModuleReactionWheel"))

-                    {

-                        this.DrawTooltipInfo(ref position, "Contains Reaction Wheels");

-                    }

-

-                    // Show if the part has an animation that can only be used once.

-                    if (part.HasOneShotAnimation())

-                    {

-                        this.DrawTooltipInfo(ref position, "Single Activation Only");

-                    }

-                }

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->DrawTooltip");

-            }

-        }

-

-        /// <summary>

-        ///     Draws a line of extended information below the previous.

-        /// </summary>

-        private void DrawTooltipInfo(ref Rect position, string value)

-        {

-            try

-            {

-                var content = new GUIContent(value);

-                var size = this.tooltipInfoStyle.CalcSize(content);

-

-                position.y += 16.0f * GuiDisplaySize.Offset;

-                position.width = size.x;

-                position.height = size.y;

-                GUI.Label(position, content, this.tooltipInfoStyle);

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->DrawTooltipInfo");

-            }

-        }

-

-        #endregion

-

-        #region Save and Load

-

-        /// <summary>

-        ///     Saves the settings when this object is destroyed.

-        /// </summary>

-        private void OnDestroy()

-        {

-            try

-            {

-                var handler = new SettingHandler();

-                handler.Set("visible", this.visible);

-                handler.Save("BuildOverlay.xml");

-                GuiDisplaySize.OnSizeChanged -= this.OnSizeChanged;

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->OnDestroy");

-            }

-        }

-

-        /// <summary>

-        ///     Loads the settings when this object is created.

-        /// </summary>

-        private void Load()

-        {

-            try

-            {

-                var handler = SettingHandler.Load("BuildOverlay.xml");

-                handler.Get("visible", ref this.visible);

-            }

-            catch (Exception ex)

-            {

-                Logger.Exception(ex, "BuildOverlay->Load");

-            }

-        }

-

-        #endregion

-    }

+// 
+//     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 System.Diagnostics;
+
+using KerbalEngineer.Extensions;
+using KerbalEngineer.Settings;
+using KerbalEngineer.VesselSimulator;
+
+using UnityEngine;
+
+#endregion
+
+namespace KerbalEngineer.Editor
+{
+    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
+    public class BuildOverlay : MonoBehaviour
+    {
+        #region Instance
+
+        /// <summary>
+        ///     Gets the current instance if started or returns null.
+        /// </summary>
+        public static BuildOverlay Instance { get; private set; }
+
+        #endregion
+
+        #region Fields
+
+        private readonly Stopwatch tooltipInfoTimer = new Stopwatch();
+        private Stage lastStage;
+
+        private Part selectedPart;
+        private int windowId;
+        private Rect windowPosition = new Rect(300.0f, 0, 0, 0);
+
+        #endregion
+
+        #region Constructors
+
+        private void Awake()
+        {
+            Instance = this;
+            GuiDisplaySize.OnSizeChanged += this.OnSizeChanged;
+        }
+
+        private void Start()
+        {
+            this.windowId = this.GetHashCode();
+            this.InitialiseStyles();
+            this.Load();
+            RenderingManager.AddToPostDrawQueue(0, this.OnDraw);
+        }
+
+        #endregion
+
+        #region Properties
+
+        private float tooltipInfoDelay = 0.5f;
+        private bool visible = true;
+
+        public float TooltipInfoDelay
+        {
+            get { return this.tooltipInfoDelay; }
+            set
+            {
+                this.tooltipInfoDelay = value;
+                Logger.Log("BuildOverlay->TooltipInfoDelay = " + value);
+            }
+        }
+
+        /// <summary>
+        ///     Gets and sets whether the display is enabled.
+        /// </summary>
+        public bool Visible
+        {
+            get { return this.visible; }
+            set
+            {
+                this.visible = value;
+                Logger.Log("BuildOverlay->Visible = " + value);
+            }
+        }
+
+        #endregion
+
+        #region GUIStyles
+
+        private GUIStyle infoStyle;
+        private GUIStyle titleStyle;
+        private GUIStyle tooltipInfoStyle;
+        private GUIStyle tooltipTitleStyle;
+        private GUIStyle windowStyle;
+
+        private void InitialiseStyles()
+        {
+            try
+            {
+                this.windowStyle = new GUIStyle(GUIStyle.none)
+                {
+                    margin = new RectOffset(),
+                    padding = new RectOffset()
+                };
+
+                this.titleStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    normal =
+                    {
+                        textColor = Color.white
+                    },
+                    margin = new RectOffset(),
+                    padding = new RectOffset(),
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    stretchWidth = true
+                };
+
+                this.infoStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    margin = new RectOffset(),
+                    padding = new RectOffset(),
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    stretchWidth = true
+                };
+
+                this.tooltipTitleStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    normal =
+                    {
+                        textColor = Color.white
+                    },
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    stretchWidth = true
+                };
+
+                this.tooltipInfoStyle = new GUIStyle(HighLogic.Skin.label)
+                {
+                    fontSize = (int)(11 * GuiDisplaySize.Offset),
+                    fontStyle = FontStyle.Bold,
+                    stretchWidth = true
+                };
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->InitialiseStyles");
+            }
+        }
+
+        private void OnSizeChanged()
+        {
+            this.InitialiseStyles();
+            this.windowPosition.width = 0;
+            this.windowPosition.height = 0;
+        }
+
+        #endregion
+
+        #region Update and Drawing
+
+        private void Update()
+        {
+            try
+            {
+                if (!this.visible || BuildAdvanced.Instance == null || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0 || EditorLogic.fetch.editorScreen != EditorLogic.EditorScreen.Parts)
+                {
+                    return;
+                }
+
+                // Configure the simulation parameters based on the selected reference body.
+                SimManager.Gravity = CelestialBodies.SelectedBody.Gravity;
+
+                if (BuildAdvanced.Instance.ShowAtmosphericDetails)
+                {
+                    SimManager.Atmosphere = CelestialBodies.SelectedBody.Atmosphere * 0.01d;
+                }
+                else
+                {
+                    SimManager.Atmosphere = 0;
+                }
+
+                SimManager.TryStartSimulation();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->Update");
+            }
+        }
+
+        private void OnDraw()
+        {
+            try
+            {
+                if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0 || EditorLogic.fetch.editorScreen != EditorLogic.EditorScreen.Parts)
+                {
+                    return;
+                }
+
+                if (SimManager.ResultsReady())
+                {
+                    this.lastStage = SimManager.LastStage;
+                }
+
+                SimManager.RequestSimulation();
+
+                if (this.lastStage == null)
+                {
+                    return;
+                }
+
+                GUI.skin = null;
+                this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, string.Empty, this.windowStyle);
+
+                // Check and set that the window is at the bottom of the screen.
+                if (this.windowPosition.y + this.windowPosition.height != Screen.height - 5.0f)
+                {
+                    this.windowPosition.y = Screen.height - this.windowPosition.height - 5.0f;
+                }
+
+                // Find if a part is selected or being hovered over.
+                if (EditorLogic.SelectedPart != null)
+                {
+                    // Do not allow the extended information to be shown.
+                    if (this.selectedPart != null)
+                    {
+                        this.selectedPart = null;
+                        this.tooltipInfoTimer.Reset();
+                    }
+
+                    this.DrawTooltip(EditorLogic.SelectedPart);
+                }
+                else
+                {
+                    var isPartSelected = false;
+                    foreach (var part in EditorLogic.SortedShipList)
+                    {
+                        if (part.stackIcon.highlightIcon)
+                        {
+                            // Start the extended information timer.
+                            if (part != this.selectedPart)
+                            {
+                                this.selectedPart = part;
+                                this.tooltipInfoTimer.Reset();
+                                this.tooltipInfoTimer.Start();
+                            }
+                            isPartSelected = true;
+
+                            this.DrawTooltip(part);
+                            break;
+                        }
+                    }
+
+                    // If no part is being hovered over we must reset the extended information timer.
+                    if (!isPartSelected && this.selectedPart != null)
+                    {
+                        this.selectedPart = null;
+                        this.tooltipInfoTimer.Reset();
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->OnDraw");
+            }
+        }
+
+        private void Window(int windowId)
+        {
+            try
+            {
+                GUILayout.BeginHorizontal();
+
+                // Titles
+                GUILayout.BeginVertical(GUILayout.Width(75.0f * GuiDisplaySize.Offset));
+                //GUILayout.Label("Parts:", this.titleStyle);
+                GUILayout.Label("Delta-V:", this.titleStyle);
+                GUILayout.Label("TWR:", this.titleStyle);
+                GUILayout.EndVertical();
+
+                // Details
+                GUILayout.BeginVertical(GUILayout.Width(100.0f * GuiDisplaySize.Offset));
+                //GUILayout.Label(SimulationManager.Instance.LastStage.partCount.ToString("N0"), this.infoStyle);
+                GUILayout.Label(this.lastStage.totalDeltaV.ToString("N0") + " m/s", this.infoStyle);
+                GUILayout.Label(this.lastStage.thrustToWeight.ToString("F2"), this.infoStyle);
+                GUILayout.EndVertical();
+
+                GUILayout.EndHorizontal();
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->Window");
+            }
+        }
+
+        /// <summary>
+        ///     Draws the tooltip details of the selected/highlighted part.
+        /// </summary>
+        private void DrawTooltip(Part part)
+        {
+            try
+            {
+                // Tooltip title (name of part).
+                var content = new GUIContent(part.partInfo.title);
+                var size = this.tooltipTitleStyle.CalcSize(content);
+                var position = new Rect(Event.current.mousePosition.x + 16.0f, Event.current.mousePosition.y, size.x, size.y).ClampInsideScreen();
+
+                if (position.x < Event.current.mousePosition.x + 16.0f)
+                {
+                    position.y += 16.0f;
+                }
+                GUI.Label(position, content, this.tooltipTitleStyle);
+
+                // After hovering for a period of time, show extended information.
+                if (this.tooltipInfoTimer.Elapsed.TotalSeconds >= this.tooltipInfoDelay)
+                {
+                    // Stop the timer as it is no longer needed.
+                    if (this.tooltipInfoTimer.IsRunning)
+                    {
+                        this.tooltipInfoTimer.Stop();
+                    }
+
+                    // Show the dry mass of the part if applicable.
+                    if (part.physicalSignificance == Part.PhysicalSignificance.FULL)
+                    {
+                        this.DrawTooltipInfo(ref position, "Dry Mass: " + part.GetDryMass().ToMass());
+                    }
+
+                    // Show resources contained within the part.
+                    if (part.ContainsResources())
+                    {
+                        // Show the wet mass of the part if applicable.
+                        if (part.GetResourceMass() > 0)
+                        {
+                            this.DrawTooltipInfo(ref position, "Wet Mass: " + part.GetWetMass().ToMass());
+                        }
+
+                        // List all the resources contained within the part.
+                        foreach (PartResource resource in part.Resources)
+                        {
+                            if (resource.GetDensity() > 0)
+                            {
+                                this.DrawTooltipInfo(ref position, resource.info.name + ": " + resource.GetMass().ToMass() + " (" + resource.amount + ")");
+                            }
+                            else
+                            {
+                                this.DrawTooltipInfo(ref position, resource.info.name + ": " + resource.amount);
+                            }
+                        }
+                    }
+
+                    // Show details for engines.
+                    if (part.IsEngine())
+                    {
+                        this.DrawTooltipInfo(ref position, "Maximum Thrust: " + part.GetMaxThrust().ToForce());
+                        this.DrawTooltipInfo(ref position, "Specific Impulse: " + part.GetSpecificImpulse(1f) + " / " + part.GetSpecificImpulse(0f) + "s");
+
+                        // Thrust vectoring.
+                        if (part.HasModule("ModuleGimbal"))
+                        {
+                            this.DrawTooltipInfo(ref position, "Thrust Vectoring Enabled");
+                        }
+
+                        // Contains alternator.
+                        if (part.HasModule("ModuleAlternator"))
+                        {
+                            this.DrawTooltipInfo(ref position, "Contains Alternator");
+                        }
+                    }
+
+                    // Show details for RCS.
+                    if (part.IsRcsModule())
+                    {
+                        var moduleRcs = part.GetModuleRcs();
+                        this.DrawTooltipInfo(ref position, "Thrust Power: " + moduleRcs.thrusterPower.ToDouble().ToForce());
+                        this.DrawTooltipInfo(ref position, "Specific Impulse: " + moduleRcs.atmosphereCurve.Evaluate(1f) + " / " + moduleRcs.atmosphereCurve.Evaluate(0f) + "s");
+                    }
+
+                    // Show details for solar panels.
+                    if (part.IsSolarPanel())
+                    {
+                        this.DrawTooltipInfo(ref position, "Charge Rate: " + part.GetModuleDeployableSolarPanel().chargeRate.ToDouble().ToRate());
+                    }
+
+                    // Show details for generators.
+                    if (part.IsGenerator())
+                    {
+                        foreach (var resource in part.GetModuleGenerator().inputList)
+                        {
+                            this.DrawTooltipInfo(ref position, "Input: " + resource.name + " (" + resource.rate.ToDouble().ToRate() + ")");
+                        }
+
+                        foreach (var resource in part.GetModuleGenerator().outputList)
+                        {
+                            this.DrawTooltipInfo(ref position, "Output: " + resource.name + " (" + resource.rate.ToDouble().ToRate() + ")");
+                        }
+                    }
+
+                    // Show details for parachutes.
+                    if (part.IsParachute())
+                    {
+                        var module = part.GetModuleParachute();
+                        this.DrawTooltipInfo(ref position, "Semi Deployed Drag: " + module.semiDeployedDrag);
+                        this.DrawTooltipInfo(ref position, "Fully Deployed Drag: " + module.fullyDeployedDrag);
+                        this.DrawTooltipInfo(ref position, "Deployment Altitude: " + module.deployAltitude.ToDouble().ToDistance());
+                    }
+
+                    // Contains stability augmentation system.
+                    if (part.HasModule("ModuleSAS"))
+                    {
+                        this.DrawTooltipInfo(ref position, "Contains SAS");
+                    }
+
+                    // Contains reaction wheels.
+                    if (part.HasModule("ModuleReactionWheel"))
+                    {
+                        this.DrawTooltipInfo(ref position, "Contains Reaction Wheels");
+                    }
+
+                    // Show if the part has an animation that can only be used once.
+                    if (part.HasOneShotAnimation())
+                    {
+                        this.DrawTooltipInfo(ref position, "Single Activation Only");
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->DrawTooltip");
+            }
+        }
+
+        /// <summary>
+        ///     Draws a line of extended information below the previous.
+        /// </summary>
+        private void DrawTooltipInfo(ref Rect position, string value)
+        {
+            try
+            {
+                var content = new GUIContent(value);
+                var size = this.tooltipInfoStyle.CalcSize(content);
+
+                position.y += 16.0f * GuiDisplaySize.Offset;
+                position.width = size.x;
+                position.height = size.y;
+                GUI.Label(position, content, this.tooltipInfoStyle);
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->DrawTooltipInfo");
+            }
+        }
+
+        #endregion
+
+        #region Save and Load
+
+        /// <summary>
+        ///     Saves the settings when this object is destroyed.
+        /// </summary>
+        private void OnDestroy()
+        {
+            try
+            {
+                var handler = new SettingHandler();
+                handler.Set("visible", this.visible);
+                handler.Save("BuildOverlay.xml");
+                GuiDisplaySize.OnSizeChanged -= this.OnSizeChanged;
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->OnDestroy");
+            }
+        }
+
+        /// <summary>
+        ///     Loads the settings when this object is created.
+        /// </summary>
+        private void Load()
+        {
+            try
+            {
+                var handler = SettingHandler.Load("BuildOverlay.xml");
+                handler.Get("visible", ref this.visible);
+            }
+            catch (Exception ex)
+            {
+                Logger.Exception(ex, "BuildOverlay->Load");
+            }
+        }
+
+        #endregion
+    }
 }

--- a/KerbalEngineer/EngineerGlobals.cs
+++ b/KerbalEngineer/EngineerGlobals.cs
@@ -1,72 +1,72 @@
-// 

-//     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.IO;

-using System.Reflection;

-

-#endregion

-

-namespace KerbalEngineer

-{

-    public class EngineerGlobals

-    {

-        #region Constants

-

-        /// <summary>

-        ///     Current version of the Kerbal Engineer assembly.

-        /// </summary>

-        public const string AssemblyVersion = "1.0.3";

-

-        #endregion

-

-        #region Properties

-

-        private static string assemblyFile;

-        private static string assemblyName;

-        private static string assemblyPath;

-

-        /// <summary>

-        ///     Gets the Kerbal Engineer assembly's path including the file name.

-        /// </summary>

-        public static string AssemblyFile

-        {

-            get { return assemblyFile ?? (assemblyFile = Assembly.GetExecutingAssembly().Location); }

-        }

-

-        /// <summary>

-        ///     Gets the Kerbal Engineer assembly's file name.

-        /// </summary>

-        public static string AssemblyName

-        {

-            get { return assemblyName ?? (assemblyName = new FileInfo(AssemblyFile).Name); }

-        }

-

-        /// <summary>

-        ///     Gets the Kerbal Engineer assembly's path excluding the file name.

-        /// </summary>

-        public static string AssemblyPath

-        {

-            get { return assemblyPath ?? (assemblyPath = AssemblyFile.Replace(new FileInfo(AssemblyFile).Name, "")); }

-        }

-

-        #endregion

-    }

+// 
+//     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.IO;
+using System.Reflection;
+
+#endregion
+
+namespace KerbalEngineer
+{
+    public class EngineerGlobals
+    {
+        #region Constants
+
+        /// <summary>
+        ///     Current version of the Kerbal Engineer assembly.
+        /// </summary>
+        public const string AssemblyVersion = "1.0.4";
+
+        #endregion
+
+        #region Properties
+
+        private static string assemblyFile;
+        private static string assemblyName;
+        private static string assemblyPath;
+
+        /// <summary>
+        ///     Gets the Kerbal Engineer assembly's path including the file name.
+        /// </summary>
+        public static string AssemblyFile
+        {
+            get { return assemblyFile ?? (assemblyFile = Assembly.GetExecutingAssembly().Location); }
+        }
+
+        /// <summary>
+        ///     Gets the Kerbal Engineer assembly's file name.
+        /// </summary>
+        public static string AssemblyName
+        {
+            get { return assemblyName ?? (assemblyName = new FileInfo(AssemblyFile).Name); }
+        }
+
+        /// <summary>
+        ///     Gets the Kerbal Engineer assembly's path excluding the file name.
+        /// </summary>
+        public static string AssemblyPath
+        {
+            get { return assemblyPath ?? (assemblyPath = AssemblyFile.Replace(new FileInfo(AssemblyFile).Name, "")); }
+        }
+
+        #endregion
+    }
 }

--- a/KerbalEngineer/KerbalEngineer.csproj
+++ b/KerbalEngineer/KerbalEngineer.csproj
@@ -1,164 +1,165 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

-  <PropertyGroup>

-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

-    <ProjectGuid>{39806613-E0B7-46E0-89A6-A569EC538CBB}</ProjectGuid>

-    <OutputType>Library</OutputType>

-    <AppDesignerFolder>Properties</AppDesignerFolder>

-    <RootNamespace>KerbalEngineer</RootNamespace>

-    <AssemblyName>KerbalEngineer</AssemblyName>

-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

-    <FileAlignment>512</FileAlignment>

-  </PropertyGroup>

-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

-    <DebugSymbols>false</DebugSymbols>

-    <DebugType>none</DebugType>

-    <Optimize>false</Optimize>

-    <OutputPath>..\Output\KerbalEngineer\</OutputPath>

-    <DefineConstants>DEBUG;TRACE</DefineConstants>

-    <ErrorReport>prompt</ErrorReport>

-    <WarningLevel>4</WarningLevel>

-    <UseVSHostingProcess>false</UseVSHostingProcess>

-  </PropertyGroup>

-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

-    <DebugType>none</DebugType>

-    <Optimize>true</Optimize>

-    <OutputPath>..\Output\KerbalEngineer\</OutputPath>

-    <DefineConstants>

-    </DefineConstants>

-    <ErrorReport>prompt</ErrorReport>

-    <WarningLevel>4</WarningLevel>

-    <UseVSHostingProcess>false</UseVSHostingProcess>

-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

-  </PropertyGroup>

-  <ItemGroup>

-    <Reference Include="Assembly-CSharp">

-      <HintPath>..\Game\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>

-      <Private>False</Private>

-    </Reference>

-    <Reference Include="Assembly-CSharp-firstpass">

-      <HintPath>..\Game\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>

-      <Private>False</Private>

-    </Reference>

-    <Reference Include="System">

-      <HintPath>..\Game\KSP_x64_Data\Managed\System.dll</HintPath>

-      <Private>False</Private>

-    </Reference>

-    <Reference Include="System.Xml">

-      <HintPath>..\Game\KSP_x64_Data\Managed\System.Xml.dll</HintPath>

-      <Private>False</Private>

-    </Reference>

-    <Reference Include="UnityEngine">

-      <HintPath>..\Game\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>

-      <Private>False</Private>

-    </Reference>

-  </ItemGroup>

-  <ItemGroup>

-    <Compile Include="Editor\BuildAdvanced.cs" />

-    <Compile Include="Editor\BuildOverlay.cs" />

-    <Compile Include="CelestialBodies.cs" />

-    <Compile Include="Editor\BuildToolbar.cs" />

-    <Compile Include="Flight\FlightEngineerPartless.cs" />

-    <Compile Include="Flight\Readouts\Misc\Separator.cs" />

-    <Compile Include="Flight\Readouts\Misc\GuiSizeAdjustor.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactBiome.cs" />

-    <Compile Include="Flight\Readouts\Surface\Slope.cs" />

-    <Compile Include="Flight\Readouts\Surface\Biome.cs" />

-    <Compile Include="Flight\Readouts\Vessel\SimulationDelay.cs" />

-    <Compile Include="Flight\Readouts\Vessel\SimulationProcessor.cs" />

-    <Compile Include="GuiDisplaySize.cs" />

-    <Compile Include="Logger.cs" />

-    <Compile Include="EngineerGlobals.cs" />

-    <Compile Include="Extensions\DoubleExtensions.cs" />

-    <Compile Include="Extensions\FloatExtensions.cs" />

-    <Compile Include="Extensions\PartExtensions.cs" />

-    <Compile Include="Extensions\PartResourceExtensions.cs" />

-    <Compile Include="Extensions\RectExtensions.cs" />

-    <Compile Include="Flight\ActionMenu.cs" />

-    <Compile Include="Flight\DisplayStack.cs" />

-    <Compile Include="Flight\FlightEngineerCore.cs" />

-    <Compile Include="Flight\FlightEngineerModule.cs" />

-    <Compile Include="Flight\IUpdatable.cs" />

-    <Compile Include="Flight\IUpdateRequest.cs" />

-    <Compile Include="Flight\Readouts\Orbital\ApoapsisHeight.cs" />

-    <Compile Include="Flight\Readouts\Orbital\Eccentricity.cs" />

-    <Compile Include="Flight\Readouts\Orbital\Inclination.cs" />

-    <Compile Include="Flight\Readouts\Orbital\LongitudeOfAscendingNode.cs" />

-    <Compile Include="Flight\Readouts\Orbital\LongitudeOfPeriapsis.cs" />

-    <Compile Include="Flight\Readouts\Orbital\OrbitalPeriod.cs" />

-    <Compile Include="Flight\Readouts\Orbital\OrbitalSpeed.cs" />

-    <Compile Include="Flight\Readouts\Orbital\PeriapsisHeight.cs" />

-    <Compile Include="Flight\Readouts\Orbital\SemiMajorAxis.cs" />

-    <Compile Include="Flight\Readouts\Orbital\SemiMinorAxis.cs" />

-    <Compile Include="Flight\Readouts\Orbital\TimeToApoapsis.cs" />

-    <Compile Include="Flight\Readouts\Orbital\TimeToPeriapsis.cs" />

-    <Compile Include="Flight\Readouts\ReadoutCategory.cs" />

-    <Compile Include="Flight\Readouts\ReadoutLibrary.cs" />

-    <Compile Include="Flight\Readouts\ReadoutModule.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\TimeToPeriapsis.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\TimeToApoapsis.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\PeriapsisHeight.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\ApoapsisHeight.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\InterceptAngle.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\OrbitalPeriod.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\Distance.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\AltitudeSeaLevel.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\AngleToDescendingNode.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\AngleToAscendingNode.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\PhaseAngle.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\RelativeInclination.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\RendezvousProcessor.cs" />

-    <Compile Include="Flight\Readouts\Rendezvous\TargetSelector.cs" />

-    <Compile Include="Flight\Readouts\Surface\AltitudeSeaLevel.cs" />

-    <Compile Include="Flight\Readouts\Surface\AltitudeTerrain.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactLatitude.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactAltitude.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactLongitude.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactTime.cs" />

-    <Compile Include="Flight\Readouts\Surface\AtmosphericProcessor.cs" />

-    <Compile Include="Flight\Readouts\Surface\AtmosphericEfficiency.cs" />

-    <Compile Include="Flight\Readouts\Surface\GeeForce.cs" />

-    <Compile Include="Flight\Readouts\Surface\HorizontalSpeed.cs" />

-    <Compile Include="Flight\Readouts\Surface\ImpactProcessor.cs" />

-    <Compile Include="Flight\Readouts\Surface\Latitude.cs" />

-    <Compile Include="Flight\Readouts\Surface\Longitude.cs" />

-    <Compile Include="Flight\Readouts\Surface\TerminalVelocity.cs" />

-    <Compile Include="Flight\Readouts\Surface\VerticalSpeed.cs" />

-    <Compile Include="Flight\Readouts\Vessel\DeltaVStaged.cs" />

-    <Compile Include="Flight\Readouts\Vessel\DeltaVTotal.cs" />

-    <Compile Include="Flight\Readouts\Vessel\Mass.cs" />

-    <Compile Include="Flight\Readouts\Vessel\Thrust.cs" />

-    <Compile Include="Flight\Readouts\Vessel\SpecificImpulse.cs" />

-    <Compile Include="Flight\Readouts\Vessel\ThrustToWeight.cs" />

-    <Compile Include="Flight\Sections\SectionEditor.cs" />

-    <Compile Include="Flight\Sections\SectionLibrary.cs" />

-    <Compile Include="Flight\Sections\SectionModule.cs" />

-    <Compile Include="Flight\Sections\SectionWindow.cs" />

-    <Compile Include="LogMsg.cs" />

-    <Compile Include="Properties\AssemblyInfo.cs" />

-    <Compile Include="Settings\SettingHandler.cs" />

-    <Compile Include="Settings\SettingItem.cs" />

-    <Compile Include="TapeDriveAnimator.cs" />

-    <Compile Include="VesselSimulator\AttachNodeSim.cs" />

-    <Compile Include="VesselSimulator\EngineSim.cs" />

-    <Compile Include="VesselSimulator\PartSim.cs" />

-    <Compile Include="VesselSimulator\ResourceContainer.cs" />

-    <Compile Include="VesselSimulator\SimManager.cs" />

-    <Compile Include="VesselSimulator\Simulation.cs" />

-    <Compile Include="VesselSimulator\Stage.cs" />

-  </ItemGroup>

-  <ItemGroup />

-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

-  <PropertyGroup>

-    <PostBuildEvent>xcopy "$(SolutionDir)Output\*" "$(SolutionDir)Game\GameData\*" /E /Y</PostBuildEvent>

-  </PropertyGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{39806613-E0B7-46E0-89A6-A569EC538CBB}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>KerbalEngineer</RootNamespace>
+    <AssemblyName>KerbalEngineer</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>false</DebugSymbols>
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\Output\KerbalEngineer\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\Output\KerbalEngineer\</OutputPath>
+    <DefineConstants>
+    </DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>..\Game\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\Game\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System">
+      <HintPath>..\Game\KSP_x64_Data\Managed\System.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System.Xml">
+      <HintPath>..\Game\KSP_x64_Data\Managed\System.Xml.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>..\Game\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Editor\BuildAdvanced.cs" />
+    <Compile Include="Editor\BuildBodiesList.cs" />
+    <Compile Include="Editor\BuildOverlay.cs" />
+    <Compile Include="CelestialBodies.cs" />
+    <Compile Include="Editor\BuildToolbar.cs" />
+    <Compile Include="Flight\FlightEngineerPartless.cs" />
+    <Compile Include="Flight\Readouts\Misc\Separator.cs" />
+    <Compile Include="Flight\Readouts\Misc\GuiSizeAdjustor.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactBiome.cs" />
+    <Compile Include="Flight\Readouts\Surface\Slope.cs" />
+    <Compile Include="Flight\Readouts\Surface\Biome.cs" />
+    <Compile Include="Flight\Readouts\Vessel\SimulationDelay.cs" />
+    <Compile Include="Flight\Readouts\Vessel\SimulationProcessor.cs" />
+    <Compile Include="GuiDisplaySize.cs" />
+    <Compile Include="Logger.cs" />
+    <Compile Include="EngineerGlobals.cs" />
+    <Compile Include="Extensions\DoubleExtensions.cs" />
+    <Compile Include="Extensions\FloatExtensions.cs" />
+    <Compile Include="Extensions\PartExtensions.cs" />
+    <Compile Include="Extensions\PartResourceExtensions.cs" />
+    <Compile Include="Extensions\RectExtensions.cs" />
+    <Compile Include="Flight\ActionMenu.cs" />
+    <Compile Include="Flight\DisplayStack.cs" />
+    <Compile Include="Flight\FlightEngineerCore.cs" />
+    <Compile Include="Flight\FlightEngineerModule.cs" />
+    <Compile Include="Flight\IUpdatable.cs" />
+    <Compile Include="Flight\IUpdateRequest.cs" />
+    <Compile Include="Flight\Readouts\Orbital\ApoapsisHeight.cs" />
+    <Compile Include="Flight\Readouts\Orbital\Eccentricity.cs" />
+    <Compile Include="Flight\Readouts\Orbital\Inclination.cs" />
+    <Compile Include="Flight\Readouts\Orbital\LongitudeOfAscendingNode.cs" />
+    <Compile Include="Flight\Readouts\Orbital\LongitudeOfPeriapsis.cs" />
+    <Compile Include="Flight\Readouts\Orbital\OrbitalPeriod.cs" />
+    <Compile Include="Flight\Readouts\Orbital\OrbitalSpeed.cs" />
+    <Compile Include="Flight\Readouts\Orbital\PeriapsisHeight.cs" />
+    <Compile Include="Flight\Readouts\Orbital\SemiMajorAxis.cs" />
+    <Compile Include="Flight\Readouts\Orbital\SemiMinorAxis.cs" />
+    <Compile Include="Flight\Readouts\Orbital\TimeToApoapsis.cs" />
+    <Compile Include="Flight\Readouts\Orbital\TimeToPeriapsis.cs" />
+    <Compile Include="Flight\Readouts\ReadoutCategory.cs" />
+    <Compile Include="Flight\Readouts\ReadoutLibrary.cs" />
+    <Compile Include="Flight\Readouts\ReadoutModule.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\TimeToPeriapsis.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\TimeToApoapsis.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\PeriapsisHeight.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\ApoapsisHeight.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\InterceptAngle.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\OrbitalPeriod.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\Distance.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\AltitudeSeaLevel.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\AngleToDescendingNode.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\AngleToAscendingNode.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\PhaseAngle.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\RelativeInclination.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\RendezvousProcessor.cs" />
+    <Compile Include="Flight\Readouts\Rendezvous\TargetSelector.cs" />
+    <Compile Include="Flight\Readouts\Surface\AltitudeSeaLevel.cs" />
+    <Compile Include="Flight\Readouts\Surface\AltitudeTerrain.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactLatitude.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactAltitude.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactLongitude.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactTime.cs" />
+    <Compile Include="Flight\Readouts\Surface\AtmosphericProcessor.cs" />
+    <Compile Include="Flight\Readouts\Surface\AtmosphericEfficiency.cs" />
+    <Compile Include="Flight\Readouts\Surface\GeeForce.cs" />
+    <Compile Include="Flight\Readouts\Surface\HorizontalSpeed.cs" />
+    <Compile Include="Flight\Readouts\Surface\ImpactProcessor.cs" />
+    <Compile Include="Flight\Readouts\Surface\Latitude.cs" />
+    <Compile Include="Flight\Readouts\Surface\Longitude.cs" />
+    <Compile Include="Flight\Readouts\Surface\TerminalVelocity.cs" />
+    <Compile Include="Flight\Readouts\Surface\VerticalSpeed.cs" />
+    <Compile Include="Flight\Readouts\Vessel\DeltaVStaged.cs" />
+    <Compile Include="Flight\Readouts\Vessel\DeltaVTotal.cs" />
+    <Compile Include="Flight\Readouts\Vessel\Mass.cs" />
+    <Compile Include="Flight\Readouts\Vessel\Thrust.cs" />
+    <Compile Include="Flight\Readouts\Vessel\SpecificImpulse.cs" />
+    <Compile Include="Flight\Readouts\Vessel\ThrustToWeight.cs" />
+    <Compile Include="Flight\Sections\SectionEditor.cs" />
+    <Compile Include="Flight\Sections\SectionLibrary.cs" />
+    <Compile Include="Flight\Sections\SectionModule.cs" />
+    <Compile Include="Flight\Sections\SectionWindow.cs" />
+    <Compile Include="LogMsg.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Settings\SettingHandler.cs" />
+    <Compile Include="Settings\SettingItem.cs" />
+    <Compile Include="TapeDriveAnimator.cs" />
+    <Compile Include="VesselSimulator\AttachNodeSim.cs" />
+    <Compile Include="VesselSimulator\EngineSim.cs" />
+    <Compile Include="VesselSimulator\PartSim.cs" />
+    <Compile Include="VesselSimulator\ResourceContainer.cs" />
+    <Compile Include="VesselSimulator\SimManager.cs" />
+    <Compile Include="VesselSimulator\Simulation.cs" />
+    <Compile Include="VesselSimulator\Stage.cs" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PostBuildEvent>xcopy "$(SolutionDir)Output\*" "$(SolutionDir)Game\GameData\*" /E /Y</PostBuildEvent>
+  </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   </Target>
   <Target Name="AfterBuild">
   </Target>
-  -->

+  -->
 </Project>

--- a/KerbalEngineer/Logger.cs
+++ b/KerbalEngineer/Logger.cs
@@ -1,155 +1,226 @@
-// 

-//     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 System.Collections.Generic;

-using System.IO;

-using System.Reflection;

-

-using UnityEngine;

-

-#endregion

-

-namespace KerbalEngineer

-{

-    [KSPAddon(KSPAddon.Startup.Instantly, false)]

-    public class Logger : MonoBehaviour

-    {

-        #region Fields

-

-        private static readonly string fileName;

-        private static readonly AssemblyName assemblyName;

-        private static readonly List<string> messages = new List<string>();

-

-        #endregion

-

-        #region Initialisation

-

-        static Logger()

-        {

-            assemblyName = Assembly.GetExecutingAssembly().GetName();

-            fileName = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "log");

-            File.Delete(fileName);

-

-            messages.Add("Version: " + assemblyName.Version);

-            Blank();

-        }

-

-        private void Awake()

-        {

-            DontDestroyOnLoad(this);

-        }

-

-        #endregion

-

-        #region Printing

-

-        public static void Blank()

-        {

-            lock (messages)

-            {

-                messages.Add(string.Empty);

-            }

-        }

-

-        public static void Log(object obj)

-        {

-            lock (messages)

-            {

-                messages.Add("[Log " + DateTime.Now.TimeOfDay + "]: " + obj);

-            }

-        }

-

-        public static void Log(string message)

-        {

-            lock (messages)

-            {

-                messages.Add("[Log " + DateTime.Now.TimeOfDay + "]: " + message);

-            }

-        }

-

-        public static void Warning(string message)

-        {

-            lock (messages)

-            {

-                messages.Add("[Warning " + DateTime.Now.TimeOfDay + "]: " + message);

-            }

-        }

-

-        public static void Error(string message)

-        {

-            lock (messages)

-            {

-                messages.Add("[Error " + DateTime.Now.TimeOfDay + "]: " + message);

-            }

-        }

-

-        public static void Exception(Exception ex)

-        {

-            lock (messages)

-            {

-                messages.Add("[Exception " + DateTime.Now.TimeOfDay + "]: " + ex.Message);

-                messages.Add(ex.StackTrace);

-                messages.Add(string.Empty);

-            }

-        }

-

-        public static void Exception(Exception ex, string location)

-        {

-            lock (messages)

-            {

-                messages.Add("[Exception " + DateTime.Now.TimeOfDay + "]: " + location + " // " + ex.Message);

-                messages.Add(ex.StackTrace);

-                messages.Add(string.Empty);

-            }

-        }

-

-        #endregion

-

-        #region Flushing

-

-        public static void Flush()

-        {

-            lock (messages)

-            {

-                if (messages.Count > 0)

-                {

-                    using (var file = File.AppendText(fileName))

-                    {

-                        foreach (var message in messages)

-                        {

-                            file.WriteLine(message);

-                            print(assemblyName.Name + " -> " + message);

-                        }

-                    }

-                    messages.Clear();

-                }

-            }

-        }

-

-        private void LateUpdate()

-        {

-            Flush();

-        }

-

-        #endregion

-    }

+// 
+//     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 System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+
+using UnityEngine;
+
+#endregion
+
+namespace KerbalEngineer
+{
+    [KSPAddon(KSPAddon.Startup.Instantly, false)]
+    public class Logger : MonoBehaviour
+    {
+        #region Constants
+
+        private static readonly string fileName;
+        private static readonly AssemblyName assemblyName;
+
+        #endregion
+
+        #region Fields
+
+        private static readonly List<string[]> messages = new List<string[]>();
+
+        #endregion
+
+        #region Initialisation
+
+        static Logger()
+        {
+            assemblyName = Assembly.GetExecutingAssembly().GetName();
+            fileName = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "log");
+            File.Delete(fileName);
+
+            lock (messages)
+            {
+                messages.Add(new[] { "Executing: " + assemblyName.Name + " - " + assemblyName.Version });
+                messages.Add(new[] { "Assembly: " + Assembly.GetExecutingAssembly().Location });
+            }
+            Blank();
+        }
+
+        private void Awake()
+        {
+            DontDestroyOnLoad(this);
+        }
+
+        #endregion
+
+        #region Printing
+
+        public static void Blank()
+        {
+            lock (messages)
+            {
+                messages.Add(new string[] { });
+            }
+        }
+
+        public static void Log(object obj)
+        {
+            lock (messages)
+            {
+                try
+                {
+                    if (obj is IEnumerable)
+                    {
+                        messages.Add(new[] { "Log " + DateTime.Now.TimeOfDay, obj.ToString() });
+                        foreach (var o in obj as IEnumerable)
+                        {
+                            messages.Add(new[] { "\t", o.ToString() });
+                        }
+                    }
+                    else
+                    {
+                        messages.Add(new[] { "Log " + DateTime.Now.TimeOfDay, obj.ToString() });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Exception(ex);
+                }
+            }
+        }
+
+        public static void Log(string name, object obj)
+        {
+            lock (messages)
+            {
+                try
+                {
+                    if (obj is IEnumerable)
+                    {
+                        messages.Add(new[] { "Log " + DateTime.Now.TimeOfDay, name });
+                        foreach (var o in obj as IEnumerable)
+                        {
+                            messages.Add(new[] { "\t", o.ToString() });
+                        }
+                    }
+                    else
+                    {
+                        messages.Add(new[] { "Log " + DateTime.Now.TimeOfDay, obj.ToString() });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Exception(ex);
+                }
+            }
+        }
+
+        public static void Log(string message)
+        {
+            lock (messages)
+            {
+                messages.Add(new[] { "Log " + DateTime.Now.TimeOfDay, message });
+            }
+        }
+
+        public static void Warning(string message)
+        {
+            lock (messages)
+            {
+                messages.Add(new[] { "Warning " + DateTime.Now.TimeOfDay, message });
+            }
+        }
+
+        public static void Error(string message)
+        {
+            lock (messages)
+            {
+                messages.Add(new[] { "Error " + DateTime.Now.TimeOfDay, message });
+            }
+        }
+
+        public static void Exception(Exception ex)
+        {
+            lock (messages)
+            {
+                messages.Add(new[] { "Exception " + DateTime.Now.TimeOfDay, ex.Message });
+                messages.Add(new[] { string.Empty, ex.StackTrace });
+                Blank();
+            }
+        }
+
+        public static void Exception(Exception ex, string location)
+        {
+            lock (messages)
+            {
+                messages.Add(new[] { "Exception " + DateTime.Now.TimeOfDay, location + " // " + ex.Message });
+                messages.Add(new[] { string.Empty, ex.StackTrace });
+                Blank();
+            }
+        }
+
+        #endregion
+
+        #region Flushing
+
+        public static void Flush()
+        {
+            lock (messages)
+            {
+                if (messages.Count > 0)
+                {
+                    using (var file = File.AppendText(fileName))
+                    {
+                        foreach (var message in messages)
+                        {
+                            file.WriteLine(message.Length > 0 ? message.Length > 1 ? "[" + message[0] + "]: " + message[1] : message[0] : string.Empty);
+                            if (message.Length > 0)
+                            {
+                                print(message.Length > 1 ? assemblyName.Name + " -> " + message[1] : assemblyName.Name + " -> " + message[0]);
+                            }
+                        }
+                    }
+                    messages.Clear();
+                }
+            }
+        }
+
+        private void LateUpdate()
+        {
+            Flush();
+        }
+
+        #endregion
+
+        #region Destruction
+
+        private void OnDestroy()
+        {
+            Flush();
+        }
+
+        ~Logger()
+        {
+            Flush();
+        }
+
+        #endregion
+    }
 }

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ
--- a/Output/ReadMe.htm
+++ b/Output/ReadMe.htm
@@ -1,243 +1,246 @@
-<!DOCTYPE html>

-<html>

-<head>

-	<meta charset='UTF-8'>

-	<title>Kerbal Engineer Redux - ReadMe</title>

-	<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'>

-	<style>

-		* {

-			margin: 0; padding: 0;

-			box-sizing: border-box; moz-box-sizing: border-box; webkit-box-sizing: border-box;

-		}

-

-		html, body {

-			height: 100%;

-			font-family: 'PT Sans', Verdana, Geneva, sans-serif;

-		}

-

-		a {

-			text-decoration: none;

-			font-weight: 700;

-			color: inherit;

-		}

-

-		a:hover {

-			text-decoration: underline;

-		}

-

-		h3 {

-			display: block;

-			line-height: 1.5em;

-			font-size: 1.1em;

-			font-weight: 700;

-		}

-

-		p {

-			display: block;

-			margin: 0 0.5em;

-			text-align: justify;

-		}

-

-		ul {

-			display: block;

-			margin-left: 1.5em;

-			list-style-type: square;

-		}

-

-		li {

-			margin-top: 0.5em;

-			text-align: justify;

-		}

-

-		header {

-			display: block;

-			padding: 25px;

-			text-align: center;

-			font-size: 3rem;

-			font-weight: 700;

-			letter-spacing: 0.2em;

-			color: white;

-			background-color: black;

-		}

-

-		section {

-			display: block;

-			margin: 10px;

-			padding: 0.5em 1em;

-			line-height: 1.5em;

-			background-color: #DDD;

-		}

-

-		footer {

-			display: block;

-			text-align: center;

-			line-height: 50px;

-			font-size: 0.8rem;

-			letter-spacing: 0.2em;

-			color: white;

-			background-color: black;

-		}

-

-		#changelog > li {

-			margin-top: 1em;

-		}

-

-		#changelog > li:first-child {

-			margin-top: 0.5em;

-		}

-

-		#root {

-			clear: both;

-			min-height: 100%;

-			height: auto !important;

-			height: 100%;

-			margin-bottom: -50px;

-		}

-

-		#root > #root_footer {

-			height: 50px;

-		}

-

-		#footer {

-			clear: both;

-			position: relative;

-			height: 50px;

-		}

-	</style>

-</head>

-<body>

-	<div id='root'>

-		<header>Kerbal Engineer Redux v1.0</header>

-

-		<section>

-			<h3>Current Version</h3>

-			<p>1.0.3.0</p>

-		</section>

-

-		<section>

-			<h3>Developers</h3>

-			<p>

-				CYBUTEK: Developer<br>

-				Padishar: Simulation Logic<br>

-				Mic_e: Impact Readouts

-			</p>

-		</section>

-

-		<section>

-			<h3>KSP-AVC Ready &amp; Includes MiniAVC</h3>

-			<p>

-				KSP Add-on Version Checker is a standardised system for versioning mods. You can get more information on this

-				<a href='http://forum.kerbalspaceprogram.com/threads/79745' target='_blank'>forum thread</a>.

-			</p>

-		</section>

-

-		<section>

-			<h3>Description</h3>

-			<p>

-				This plugin will allow you to view important statistics about your ship on the fly, whilst building it and in flight.

-			</p>

-		</section>

-

-		<section>

-			<h3>Installation</h3>

-			<ul>

-				<li>Copy the 'KerbalEngineer' folder into the 'GameData' folder located within your Kerbal Space Program installation directory.</li>

-				<li>

-					Attach an Engineer part from the science tab to your ship.

-					<ul>

-						<li>ER7500 includes flight engineer.</li>

-					</ul>

-				</li>

-			</ul>

-		</section>

-

-		<section>

-			<h3>Change Log</h3>

-			<ul id='changelog'>

-				<li>

-					1.0.3.0

-					<ul>

-						<li>Added: Integrated KSP-AVC support with MiniAVC.</li>

-						<li>Added: Setting to change the simulation delay in the Build Engineer.</li>

-						<li>Added: Setting to enable and disable the build overlay system.</li>

-						<li>Added: Burn time to Delta-V readouts.</li>

-						<li>Added: Atmospheric readouts fully support FAR.</li>

-						<li>Added: Atmospheric readouts are disabled with NEAR.</li>

-						<li>Changed: Force formatting inversely scales decimal precision with value.</li>

-						<li>Fixed: Flickering in VAB and Vessel display.</li>

-						<li>Fixed: Bug saving the GUI display size.</li>

-					</ul>

-				</li>

-				<li>

-					1.0.2.0

-					<ul>

-						<li>Added: Separator readout module under Misc in the Flight Engineer.</li>

-						<li>Added: Adjustable GUI display size.</li>

-						<li>Added: Display size can be adjusted in the Build Engineer settings.</li>

-						<li>Added: Misc readout for adjusting display size in the Flight Engineer.</li>

-						<li>Changed: The rendezvous readout for the target's Orbital Period has higher precision.</li>

-						<li>Fixed: White toolbar icon by manually importing the texture if it cannot be found in the game database.</li>

-						<li>Fixed: Engines that have a minimum thrust are now calculated properly. (Thanks to nosscire.)</li>

-						<li>Fixed: Compact collapse mode is now saved in the Build Engineer.</li>

-					</ul>

-				</li>

-				<li>

-					1.0.1.0

-					<ul>

-						<li>Added: Part-less Flight Engineer.</li>

-						<li>Added: Ability to collapse the Build Engineer into compact mode from left or right.</li>

-						<li>Added: Settings in Build Engineer for compact collapse mode and partless/module Flight Engineer.</li>

-						<li>Added: Biome, Impact Biome and Slope readouts.</li>

-						<li>Added: Extra logging and exception handling.</li>

-						<li>Added: The original Engineer Chip part.</li>

-						<li>Added: "Show Engineer" toggle on the Flight Engineer toolbar.</li>

-						<li>Changed: Extended logging system now also writes to the standard KSP logs.</li>

-						<li>Changed: Extended logging saves next to the .dll file.</li>

-						<li>Changed: ER7500 part has no physical significance.</li>

-						<li>Fixed: ActionMenu and DisplayStack destruction bug.</li>

-					</ul>

-				</li>

-				<li>

-					1.0.0.1

-					<ul>

-						<li>Added: Stock toolbar support in the Flight Engineer.</li>

-						<li>Changed: Orbital Period has higher precision.</li>

-						<li>Fixed: Various NullRefs in editor window and overlay.</li>

-					</ul>

-				</li>

-				<li>

-					1.0.0.0

-					<ul>

-						<li>Initial release for public testing.</li>

-					</ul>

-				</li>

-			</ul>

-		</section>

-

-		<section>

-			<h3>Software License</h3>

-			<p>

-				Copyright &copy; 2014 CYBUTEK

-				<br><br>

-				This program is free software: you can redistribute it and/or modify<br>

-				it under the terms of the GNU General Public License as published by<br>

-				the Free Software Foundation, either version 3 of the License, or<br>

-				(at your option) any later version.

-				<br><br>

-				This program is distributed in the hope that it will be useful,<br>

-				but WITHOUT ANY WARRANTY; without even the implied warranty of<br>

-				MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>

-				GNU General Public License for more details.

-				<br><br>

-				Licensed under <a href='http://www.gnu.org/licenses/gpl-3.0.html' target='_blank'>GNU General Public License v3</a>

-			</p>

-		</section>

-

-		<div id='root_footer'></div>

-	</div>

-

-	<footer id='footer'>

-		ReadMe Design by <a href='http://ksp.cybutek.net' target='_blank'><strong>CYBUTEK</strong></a> (GPLv3)

-	</footer>

-</body>

+<!DOCTYPE html>
+<html>
+<head>
+	<meta charset='UTF-8'>
+	<title>Kerbal Engineer Redux - ReadMe</title>
+	<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'>
+	<style>
+		* {
+			margin: 0; padding: 0;
+			box-sizing: border-box; moz-box-sizing: border-box; webkit-box-sizing: border-box;
+		}
+
+		html, body {
+			height: 100%;
+			font-family: 'PT Sans', Verdana, Geneva, sans-serif;
+		}
+
+		a {
+			text-decoration: none;
+			font-weight: 700;
+			color: inherit;
+		}
+
+		a:hover {
+			text-decoration: underline;
+		}
+
+		h3 {
+			display: block;
+			line-height: 1.5em;
+			font-size: 1.1em;
+			font-weight: 700;
+		}
+
+		p {
+			display: block;
+			margin: 0 0.5em;
+			text-align: justify;
+		}
+
+		ul {
+			display: block;
+			margin-left: 1.5em;
+			list-style-type: square;
+		}
+
+		li {
+			margin-top: 0.5em;
+			text-align: justify;
+		}
+
+		header {
+			display: block;
+			padding: 25px;
+			text-align: center;
+			font-size: 3rem;
+			font-weight: 700;
+			letter-spacing: 0.2em;
+			color: white;
+			background-color: black;
+		}
+
+		section {
+			display: block;
+			margin: 10px;
+			padding: 0.5em 1em;
+			line-height: 1.5em;
+			background-color: #DDD;
+		}
+
+		footer {
+			display: block;
+			text-align: center;
+			line-height: 50px;
+			font-size: 0.8rem;
+			letter-spacing: 0.2em;
+			color: white;
+			background-color: black;
+		}
+
+		#changelog > li {
+			margin-top: 1em;
+		}
+
+		#changelog > li:first-child {
+			margin-top: 0.5em;
+		}
+
+		#root {
+			clear: both;
+			min-height: 100%;
+			height: auto !important;
+			height: 100%;
+			margin-bottom: -50px;
+		}
+
+		#root > #root_footer {
+			height: 50px;
+		}
+
+		#footer {
+			clear: both;
+			position: relative;
+			height: 50px;
+		}
+	</style>
+</head>
+<body>
+	<div id='root'>
+		<header>Kerbal Engineer Redux v1.0</header>
+
+		<section>
+			<h3>Current Version</h3>
+			<p>1.0.4.0</p>
+		</section>
+
+		<section>
+			<h3>Developers</h3>
+			<p>
+				CYBUTEK: Developer<br>
+				Padishar: Simulation Logic<br>
+				Mic_e: Impact Readouts
+			</p>
+		</section>
+
+		<section>
+			<h3>KSP-AVC Ready &amp; Includes MiniAVC</h3>
+			<p>
+				KSP Add-on Version Checker is a standardised system for versioning mods. You can get more information on this
+				<a href='http://forum.kerbalspaceprogram.com/threads/79745' target='_blank'>forum thread</a>.
+			</p>
+		</section>
+
+		<section>
+			<h3>Description</h3>
+			<p>
+				This plugin will allow you to view important statistics about your ship on the fly, whilst building it and in flight.
+			</p>
+		</section>
+
+		<section>
+			<h3>Installation</h3>
+			<ul>
+				<li>Copy the 'KerbalEngineer' folder into the 'GameData' folder located within your Kerbal Space Program installation directory.</li>
+				<li>
+					Attach an Engineer part from the science tab to your ship.
+					<ul>
+						<li>ER7500 includes flight engineer.</li>
+					</ul>
+				</li>
+			</ul>
+		</section>
+
+		<section>
+			<h3>Change Log</h3>
+			<ul id='changelog'>
+				<li>1.0.4.0
+					<ul>
+						<li>Added: Dynamically generated celestial body library for supporting add-ons that modify the star system.</li>
+						<li>Changed: Reference bodies are now listed with a nestable menu system.</li>
+						<li>Changed: Extended logging system has been improved.</li>
+						<li>Changed: Swapped out integrated MiniAVC in place of the official bundle version.</li>
+					</ul>
+				</li>
+				<li>1.0.3.0
+					<ul>
+						<li>Added: Integrated KSP-AVC support with MiniAVC.</li>
+						<li>Added: Setting to change the simulation delay in the Build Engineer.</li>
+						<li>Added: Setting to enable and disable the build overlay system.</li>
+						<li>Added: Burn time to Delta-V readouts.</li>
+						<li>Added: Atmospheric readouts fully support FAR.</li>
+						<li>Added: Atmospheric readouts are disabled with NEAR.</li>
+						<li>Changed: Force formatting inversely scales decimal precision with value.</li>
+						<li>Fixed: Flickering in VAB and Vessel display.</li>
+						<li>Fixed: Bug saving the GUI display size.</li>
+					</ul>
+				</li>
+				<li>1.0.2.0
+					<ul>
+						<li>Added: Separator readout module under Misc in the Flight Engineer.</li>
+						<li>Added: Adjustable GUI display size.</li>
+						<li>Added: Display size can be adjusted in the Build Engineer settings.</li>
+						<li>Added: Misc readout for adjusting display size in the Flight Engineer.</li>
+						<li>Changed: The rendezvous readout for the target's Orbital Period has higher precision.</li>
+						<li>Fixed: White toolbar icon by manually importing the texture if it cannot be found in the game database.</li>
+						<li>Fixed: Engines that have a minimum thrust are now calculated properly. (Thanks to nosscire.)</li>
+						<li>Fixed: Compact collapse mode is now saved in the Build Engineer.</li>
+					</ul>
+				</li>
+				<li>1.0.1.0
+					<ul>
+						<li>Added: Part-less Flight Engineer.</li>
+						<li>Added: Ability to collapse the Build Engineer into compact mode from left or right.</li>
+						<li>Added: Settings in Build Engineer for compact collapse mode and partless/module Flight Engineer.</li>
+						<li>Added: Biome, Impact Biome and Slope readouts.</li>
+						<li>Added: Extra logging and exception handling.</li>
+						<li>Added: The original Engineer Chip part.</li>
+						<li>Added: "Show Engineer" toggle on the Flight Engineer toolbar.</li>
+						<li>Changed: Extended logging system now also writes to the standard KSP logs.</li>
+						<li>Changed: Extended logging saves next to the .dll file.</li>
+						<li>Changed: ER7500 part has no physical significance.</li>
+						<li>Fixed: ActionMenu and DisplayStack destruction bug.</li>
+					</ul>
+				</li>
+				<li>1.0.0.1
+					<ul>
+						<li>Added: Stock toolbar support in the Flight Engineer.</li>
+						<li>Changed: Orbital Period has higher precision.</li>
+						<li>Fixed: Various NullRefs in editor window and overlay.</li>
+					</ul>
+				</li>
+				<li>1.0.0.0
+					<ul>
+						<li>Initial release for public testing.</li>
+					</ul>
+				</li>
+			</ul>
+		</section>
+
+		<section>
+			<h3>Software License</h3>
+			<p>
+				Copyright &copy; 2014 CYBUTEK
+				<br><br>
+				This program is free software: you can redistribute it and/or modify<br>
+				it under the terms of the GNU General Public License as published by<br>
+				the Free Software Foundation, either version 3 of the License, or<br>
+				(at your option) any later version.
+				<br><br>
+				This program is distributed in the hope that it will be useful,<br>
+				but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+				MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+				GNU General Public License for more details.
+				<br><br>
+				Licensed under <a href='http://www.gnu.org/licenses/gpl-3.0.html' target='_blank'>GNU General Public License v3</a>
+			</p>
+		</section>
+
+		<div id='root_footer'></div>
+	</div>
+
+	<footer id='footer'>
+		ReadMe Design by <a href='http://ksp.cybutek.net' target='_blank'><strong>CYBUTEK</strong></a> (GPLv3)
+	</footer>
+</body>
 </html>