Fixed issue where fairing mass was being incorrectly calculated. This was due to how KSP now doesn't include the mass on the part itself but only as module mass.
Fixed issue where fairing mass was being incorrectly calculated. This was due to how KSP now doesn't include the mass on the part itself but only as module mass.

 Binary files a/Assets/Plugins/KerbalEngineer.Unity.dll and b/Assets/Plugins/KerbalEngineer.Unity.dll differ
--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,4 +1,7 @@
-1.1.0.0, XX-XX-16
+1.1.0.1
+    Fixed: Heatshields acting as staged decouplers when not set to be staged.
+
+1.1.0.0, 30-03-16
     Added: Asset bundle loading and integration.
     Added: Styling system so that Unity UI objects can use KSP stock styles.
     Added: Unity UI window system.

--- a/KerbalEngineer/AppLauncherButton.cs
+++ b/KerbalEngineer/AppLauncherButton.cs
@@ -24,7 +24,7 @@
 
     public class AppLauncherButton : MonoBehaviour
     {
-        private static Texture m_IconTexture;
+        private static Texture s_IconTexture;
         private ApplicationLauncherButton m_Button;
 
         /// <summary>
@@ -124,9 +124,9 @@
         protected virtual void Awake()
         {
             // cache icon texture
-            if (m_IconTexture == null && AssetBundleLoader.Images != null)
-            {
-                m_IconTexture = AssetBundleLoader.Images.LoadAsset<Texture2D>("app-launcher-icon");
+            if (s_IconTexture == null && AssetBundleLoader.Images != null)
+            {
+                s_IconTexture = AssetBundleLoader.Images.LoadAsset<Texture2D>("app-launcher-icon");
             }
 
             // subscribe event listeners
@@ -186,7 +186,7 @@
             // create button
             if (ApplicationLauncher.Instance != null)
             {
-                m_Button = ApplicationLauncher.Instance.AddModApplication(OnTrue, OnFalse, OnHover, OnHoverOut, OnEnable, OnDisable, ApplicationLauncher.AppScenes.ALWAYS, m_IconTexture);
+                m_Button = ApplicationLauncher.Instance.AddModApplication(OnTrue, OnFalse, OnHover, OnHoverOut, OnEnable, OnDisable, ApplicationLauncher.AppScenes.ALWAYS, s_IconTexture);
             }
 
             OnReady();

--- a/KerbalEngineer/AssetBundleLoader.cs
+++ b/KerbalEngineer/AssetBundleLoader.cs
@@ -23,8 +23,8 @@
     [KSPAddon(KSPAddon.Startup.Instantly, false)]
     public class AssetBundleLoader : MonoBehaviour
     {
-        private static AssetBundle m_Images;
-        private static AssetBundle m_Prefabs;
+        private static AssetBundle s_Images;
+        private static AssetBundle s_Prefabs;
 
         /// <summary>
         ///     Gets the loaded images asset bundle.
@@ -33,7 +33,7 @@
         {
             get
             {
-                return m_Images;
+                return s_Images;
             }
         }
 
@@ -44,7 +44,7 @@
         {
             get
             {
-                return m_Prefabs;
+                return s_Prefabs;
             }
         }
 
@@ -52,8 +52,8 @@
         {
             string bundlePath = EngineerGlobals.AssemblyPath;
 
-            m_Images = AssetBundle.CreateFromFile(bundlePath + "/images");
-            m_Prefabs = AssetBundle.CreateFromFile(bundlePath + "/prefabs");
+            s_Images = AssetBundle.CreateFromFile(bundlePath + "/images");
+            s_Prefabs = AssetBundle.CreateFromFile(bundlePath + "/prefabs");
         }
     }
 }

--- a/KerbalEngineer/EngineerGlobals.cs
+++ b/KerbalEngineer/EngineerGlobals.cs
@@ -25,7 +25,7 @@
         /// <summary>
         ///     Current version of the Kerbal Engineer assembly.
         /// </summary>
-        public const string ASSEMBLY_VERSION = "1.0.19.4";
+        public const string ASSEMBLY_VERSION = "1.1.0.0";
 
         private static string assemblyFile;
         private static string assemblyName;

--- a/KerbalEngineer/Extensions/PartExtensions.cs
+++ b/KerbalEngineer/Extensions/PartExtensions.cs
@@ -572,6 +572,7 @@
 
             public double EjectionForce { get; private set; }
             public bool IsOmniDecoupler { get; private set; }
+            public bool IsStageEnabled { get; private set; }
 
             private void SetModuleAnchoredDecoupler()
             {
@@ -582,6 +583,7 @@
                 }
 
                 EjectionForce = decoupler.ejectionForce;
+                IsStageEnabled = decoupler.stagingEnabled;
             }
 
             private void SetModuleDecouple()
@@ -594,6 +596,7 @@
 
                 EjectionForce = decoupler.ejectionForce;
                 IsOmniDecoupler = decoupler.isOmniDecoupler;
+                IsStageEnabled = decoupler.stagingEnabled;
             }
         }
 

--- a/KerbalEngineer/Flight/FlightEngineerModule.cs
+++ b/KerbalEngineer/Flight/FlightEngineerModule.cs
@@ -23,8 +23,17 @@
 
 namespace KerbalEngineer.Flight
 {
+    using VesselSimulator;
+
     /// <summary>
     ///     Module that can be attached to parts, giving them FlightEngineerCore management.
     /// </summary>
-    public class FlightEngineerModule : PartModule { }
+    public class FlightEngineerModule : PartModule
+    {
+        [KSPEvent(guiName = "Verbose Simulation Log", guiActive = true, guiActiveEditor = true)]
+        public void SimulationDump()
+        {
+            SimManager.logOutput = true;
+        }
+    }
 }

--- a/KerbalEngineer/Flight/Readouts/Vessel/DeltaVStaged.cs
+++ b/KerbalEngineer/Flight/Readouts/Vessel/DeltaVStaged.cs
@@ -28,6 +28,8 @@
 
 namespace KerbalEngineer.Flight.Readouts.Vessel
 {
+    using KSP.UI.Screens;
+
     public class DeltaVStaged : ReadoutModule
     {
         #region Constructors
@@ -51,7 +53,7 @@
                 return;
             }
 
-            foreach (var stage in SimulationProcessor.Stages.Where(stage => stage.deltaV > 0 || stage.number == Staging.CurrentStage))
+            foreach (var stage in SimulationProcessor.Stages.Where(stage => stage.deltaV > 0 || stage.number == StageManager.CurrentStage))
             {
                 this.DrawLine("DeltaV (S" + stage.number + ")", stage.deltaV.ToString("N0") + "m/s (" + TimeFormatter.ConvertToString(stage.time) + ")", section.IsHud);
             }

--- a/KerbalEngineer/Flight/Readouts/Vessel/SuicideBurnProcessor.cs
+++ b/KerbalEngineer/Flight/Readouts/Vessel/SuicideBurnProcessor.cs
@@ -17,32 +17,16 @@
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 
 
-#region Using Directives
-
-
-
-#endregion
-
 namespace KerbalEngineer.Flight.Readouts.Vessel
 {
-    #region Using Directives
-
     using System;
-
-    #endregion
 
     public class SuicideBurnProcessor : IUpdatable, IUpdateRequest
     {
-        #region Fields
-
-        private static readonly SuicideBurnProcessor instance = new SuicideBurnProcessor();
-        private double acceleration;
-        private double gravity;
-        private double radarAltitude;
-
-        #endregion
-
-        #region Properties
+        private static readonly SuicideBurnProcessor s_Instance = new SuicideBurnProcessor();
+        private double m_Acceleration;
+        private double m_Gravity;
+        private double m_RadarAltitude;
 
         public static double Altitude { get; private set; }
 
@@ -52,50 +36,48 @@
 
         public static SuicideBurnProcessor Instance
         {
-            get { return instance; }
+            get
+            {
+                return s_Instance;
+            }
         }
 
         public static bool ShowDetails { get; set; }
 
+        public void Update()
+        {
+            if (FlightGlobals.currentMainBody == null || FlightGlobals.ActiveVessel == null || SimulationProcessor.LastStage == null ||
+                FlightGlobals.ship_orbit.PeA >= 0.0 || !SimulationProcessor.ShowDetails)
+            {
+                ShowDetails = false;
+                return;
+            }
+
+            m_Gravity = FlightGlobals.currentMainBody.gravParameter / Math.Pow(FlightGlobals.currentMainBody.Radius, 2.0);
+            m_Acceleration = SimulationProcessor.LastStage.thrust / SimulationProcessor.LastStage.totalMass;
+            m_RadarAltitude = FlightGlobals.ActiveVessel.terrainAltitude > 0.0
+                ? FlightGlobals.ship_altitude - FlightGlobals.ActiveVessel.terrainAltitude
+                : FlightGlobals.ship_altitude;
+
+            DeltaV = Math.Sqrt((2 * m_Gravity * m_RadarAltitude) + Math.Pow(FlightGlobals.ship_verticalSpeed, 2.0));
+            Altitude = Math.Pow(DeltaV, 2.0) / (2.0 * m_Acceleration);
+            Distance = m_RadarAltitude - Altitude;
+
+            ShowDetails = !double.IsInfinity(Distance);
+        }
+
         public bool UpdateRequested { get; set; }
-
-        #endregion
-
-        #region Methods
 
         public static void RequestUpdate()
         {
-            instance.UpdateRequested = true;
+            s_Instance.UpdateRequested = true;
             SimulationProcessor.RequestUpdate();
         }
 
         public static void Reset()
         {
             FlightEngineerCore.Instance.AddUpdatable(SimulationProcessor.Instance);
-            FlightEngineerCore.Instance.AddUpdatable(instance);
+            FlightEngineerCore.Instance.AddUpdatable(s_Instance);
         }
-
-        public void Update()
-        {
-            if (FlightGlobals.ship_orbit.PeA >= 0.0 || !SimulationProcessor.ShowDetails)
-            {
-                ShowDetails = false;
-                return;
-            }
-
-            this.gravity = FlightGlobals.currentMainBody.gravParameter / Math.Pow(FlightGlobals.currentMainBody.Radius, 2.0);
-            this.acceleration = SimulationProcessor.LastStage.thrust / SimulationProcessor.LastStage.totalMass;
-            this.radarAltitude = FlightGlobals.ActiveVessel.terrainAltitude > 0.0
-                ? FlightGlobals.ship_altitude - FlightGlobals.ActiveVessel.terrainAltitude
-                : FlightGlobals.ship_altitude;
-
-            DeltaV = Math.Sqrt((2 * this.gravity * this.radarAltitude) + Math.Pow(FlightGlobals.ship_verticalSpeed, 2.0));
-            Altitude = Math.Pow(DeltaV, 2.0) / (2.0 * this.acceleration);
-            Distance = this.radarAltitude - Altitude;
-
-            ShowDetails = !Double.IsInfinity(Distance);
-        }
-
-        #endregion
     }
 }

--- a/KerbalEngineer/Flight/Readouts/Vessel/SurfaceThrustToWeight.cs
+++ b/KerbalEngineer/Flight/Readouts/Vessel/SurfaceThrustToWeight.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2014 CYBUTEK
+//     Copyright (C) 2016 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
@@ -12,55 +12,41 @@
 //     but WITHOUT ANY WARRANTY; without even the implied warranty of
 //     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //     GNU General Public License for more details.
-// 
 //     You should have received a copy of the GNU General Public License
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
-
-#region Using Directives
-
-using System;
-
-using KerbalEngineer.Flight.Sections;
-
-#endregion
+//  
 
 namespace KerbalEngineer.Flight.Readouts.Vessel
 {
+    using System;
+    using Sections;
+
     public class SurfaceThrustToWeight : ReadoutModule
     {
-        #region Fields
-
-        private string actual = string.Empty;
-        private double gravity;
-        private string total = string.Empty;
-
-        #endregion
-
-        #region Constructors
+        private string m_Actual = string.Empty;
+        private double m_Gravity;
+        private string m_Total = string.Empty;
 
         public SurfaceThrustToWeight()
         {
-            this.Name = "Surface Thrust to Weight Ratio";
-            this.Category = ReadoutCategory.GetCategory("Vessel");
-            this.HelpString = "Shows the vessel's surface thrust to weight ratio.";
-            this.IsDefault = true;
+            Name = "Surface Thrust to Weight Ratio";
+            Category = ReadoutCategory.GetCategory("Vessel");
+            HelpString = "Shows the vessel's surface thrust to weight ratio.";
+            IsDefault = true;
         }
-
-        #endregion
-
-        #region Methods: public
 
         public override void Draw(SectionModule section)
         {
-            if (!SimulationProcessor.ShowDetails)
+            if (FlightGlobals.currentMainBody == null || SimulationProcessor.LastStage == null ||
+                !SimulationProcessor.ShowDetails)
             {
                 return;
             }
-            this.gravity = FlightGlobals.currentMainBody.gravParameter / Math.Pow(FlightGlobals.currentMainBody.Radius, 2);
-            this.actual = (SimulationProcessor.LastStage.actualThrust / (SimulationProcessor.LastStage.totalMass * this.gravity)).ToString("F2");
-            this.total = (SimulationProcessor.LastStage.thrust / (SimulationProcessor.LastStage.totalMass * this.gravity)).ToString("F2");
-            this.DrawLine("TWR (Surface)", this.actual + " / " + this.total, section.IsHud);
+
+            m_Gravity = FlightGlobals.currentMainBody.gravParameter / Math.Pow(FlightGlobals.currentMainBody.Radius, 2);
+            m_Actual = (SimulationProcessor.LastStage.actualThrust / (SimulationProcessor.LastStage.totalMass * m_Gravity)).ToString("F2");
+            m_Total = (SimulationProcessor.LastStage.thrust / (SimulationProcessor.LastStage.totalMass * m_Gravity)).ToString("F2");
+            DrawLine("TWR (Surface)", m_Actual + " / " + m_Total, section.IsHud);
         }
 
         public override void Reset()
@@ -72,7 +58,5 @@
         {
             SimulationProcessor.RequestUpdate();
         }
-
-        #endregion
     }
 }

--- a/KerbalEngineer/LogMsg.cs
+++ b/KerbalEngineer/LogMsg.cs
@@ -1,6 +1,4 @@
 using System.Text;
-
-using UnityEngine;
 
 namespace KerbalEngineer
 {
@@ -16,7 +14,9 @@
         public void Flush()
         {
             if (this.buf.Length > 0)
-                MonoBehaviour.print(this.buf);
+            {
+                Logger.Log(this.buf);
+            }
             this.buf.Length = 0;
         }
     }

--- a/KerbalEngineer/StyleManager.cs
+++ b/KerbalEngineer/StyleManager.cs
@@ -25,8 +25,8 @@
 
     public static class StyleManager
     {
-        private static GameObject m_WindowPrefab;
-        private static GameObject m_SettingPrefab;
+        private static GameObject s_WindowPrefab;
+        private static GameObject s_SettingPrefab;
 
         /// <summary>
         ///     Creates a setting on the supplied window.
@@ -126,12 +126,12 @@
         /// </summary>
         private static GameObject GetSettingPrefab()
         {
-            if (m_SettingPrefab == null)
-            {
-                m_SettingPrefab = AssetBundleLoader.Prefabs.LoadAsset<GameObject>("Setting");
-            }
-
-            return m_SettingPrefab;
+            if (s_SettingPrefab == null)
+            {
+                s_SettingPrefab = AssetBundleLoader.Prefabs.LoadAsset<GameObject>("Setting");
+            }
+
+            return s_SettingPrefab;
         }
 
         /// <summary>
@@ -161,12 +161,12 @@
         /// </summary>
         private static GameObject GetWindowPrefab()
         {
-            if (m_WindowPrefab == null)
-            {
-                m_WindowPrefab = AssetBundleLoader.Prefabs.LoadAsset<GameObject>("Window");
-            }
-
-            return m_WindowPrefab;
+            if (s_WindowPrefab == null)
+            {
+                s_WindowPrefab = AssetBundleLoader.Prefabs.LoadAsset<GameObject>("Window");
+            }
+
+            return s_WindowPrefab;
         }
 
         /// <summary>

--- a/KerbalEngineer/VesselSimulator/PartSim.cs
+++ b/KerbalEngineer/VesselSimulator/PartSim.cs
@@ -417,9 +417,9 @@
                 mass += resources.GetResourceMass(resources.Types[i]);
             }
 
-            if (isFairing && currentStage <= inverseStage)
-            {
-                mass -= fairingMass;
+            if (isFairing && currentStage > inverseStage)
+            {
+                mass += fairingMass;
             }
 
             return mass;
@@ -777,8 +777,7 @@
 
         private bool IsDecoupler(Part thePart)
         {
-            return thePart.HasModule<ModuleDecouple>() ||
-                   thePart.HasModule<ModuleAnchoredDecoupler>();
+            return thePart.GetProtoModuleDecoupler()?.IsStageEnabled ?? false;
         }
 
         private bool IsFairing(Part thePart)

--- a/KerbalEngineer/VesselSimulator/Simulation.cs
+++ b/KerbalEngineer/VesselSimulator/Simulation.cs
@@ -34,6 +34,7 @@
     using CompoundParts;
     using Extensions;
     using Helpers;
+    using KSP.UI.Screens;
 
     public class Simulation
     {
@@ -147,7 +148,7 @@
             this.gravity = theGravity;
             this.atmosphere = theAtmosphere;
             this.mach = theMach;
-            this.lastStage = Staging.lastStage;
+            this.lastStage = StageManager.LastStage;
             this.maxMach = 1.0f;
             //MonoBehaviour.print("lastStage = " + lastStage);
 

 Binary files a/Output/KerbalEngineer/KerbalEngineer.Unity.dll and b/Output/KerbalEngineer/KerbalEngineer.Unity.dll differ
 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ
--- a/Output/KerbalEngineer/KerbalEngineer.version
+++ b/Output/KerbalEngineer/KerbalEngineer.version
@@ -4,9 +4,9 @@
 	"VERSION":
 	{
 		"MAJOR":1,
-		"MINOR":0,
-		"PATCH":19,
-		"BUILD":4
+		"MINOR":1,
+		"PATCH":0,
+		"BUILD":0
 	},
 	"KSP_VERSION":
 	{

--- a/Output/KerbalEngineer/Parts/Engineer7500/part.cfg
+++ b/Output/KerbalEngineer/Parts/Engineer7500/part.cfg
@@ -14,12 +14,13 @@
 	// --- editor parameters ---
 	TechRequired = start
 	entryCost = 0
-	cost = 500
+	cost = 150
 	category = Science
 	subcategory = 0
 	title = ER-7500 Computer Flight Unit
 	manufacturer = CYBUTEK Solutions Ltd.
-	description = The ER-7500 goes back to roots with the Kerbal Engineering System.  This unit has been proven to be at least 1x10^-5 times faster than a standard hard drive.
+	description = The ER-7500 goes back to roots with the Kerbal Engineering System. This unit has been proven to be at least 1x10^-5 times faster than a standard hard drive... Don't tell anyone but it's actually just the chip version in a fancy box with flashing lights and spinny things.
+    tags = ker engi redux compu flight tape
 
 	// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
 	attachRules = 0,1,0,1,1

--- a/Output/KerbalEngineer/Parts/EngineerChip/part.cfg
+++ b/Output/KerbalEngineer/Parts/EngineerChip/part.cfg
@@ -22,12 +22,13 @@
 	// --- editor parameters ---
 	TechRequired = start
   	entryCost = 0
-	cost = 350
+	cost = 100
 	category = Science
 	subcategory = 0
 	title = Kerbal Engineering System
 	manufacturer = CYBUTEK Solutions Ltd.
 	description = The Kerbal Engineering System boasts an impressive 128bits of solid state storage and enough processing power to run at least 3 digital watches.
+    tags = ker engi redux compu flight chip
 
 	// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
 	attachRules = 0,1,0,1,1