Merge pull request #12 from Gerry1135/nodefix
Merge pull request #12 from Gerry1135/nodefix

Fix for low level tracking station not supporting patched conics

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,4 +1,4 @@
-1.0.13
+1.0.13, 16-12-2014
 	Updated for KSP version 0.90
 
     Added: New readouts to the vessel category:
@@ -6,6 +6,7 @@
         - Pitch Rate
         - Roll Rate
 
+    Changed: Simulation to look for fuel lines that use CModuleFuelLine module.
 	Fixed: Editor Overlay now loads the saved visibility value properly.
     Fixed: Altitude (Terrain) will no longer give a reading below sea level.
     Fixed: Suicide burn now uses radar altitude that clamps to sea level.

--- a/KerbalEngineer/Extensions/PartExtensions.cs
+++ b/KerbalEngineer/Extensions/PartExtensions.cs
@@ -27,6 +27,8 @@
 
 namespace KerbalEngineer.Extensions
 {
+    using CompoundParts;
+
     public static class PartExtensions
     {
         #region Methods: public
@@ -387,7 +389,7 @@
         /// </summary>
         public static bool IsFuelLine(this Part part)
         {
-            return (part is FuelLine);
+            return (HasModule<CModuleFuelLine>(part));
         }
 
         /// <summary>

--- a/KerbalEngineer/Flight/Readouts/Orbital/ManoeuvreNode/ManoeuvreProcessor.cs
+++ b/KerbalEngineer/Flight/Readouts/Orbital/ManoeuvreNode/ManoeuvreProcessor.cs
@@ -91,7 +91,11 @@
 
         public void Update()
         {
-            if (FlightGlobals.ActiveVessel.patchedConicSolver.maneuverNodes.Count == 0 || !SimulationProcessor.ShowDetails)
+            // Extra tests for low level tracking station not supporting patched conics and maneuver nodes
+            if (FlightGlobals.ActiveVessel.patchedConicSolver == null ||
+                FlightGlobals.ActiveVessel.patchedConicSolver.maneuverNodes == null ||
+                FlightGlobals.ActiveVessel.patchedConicSolver.maneuverNodes.Count == 0 ||
+                !SimulationProcessor.ShowDetails)
             {
                 ShowDetails = false;
                 return;

--- a/KerbalEngineer/VesselSimulator/PartSim.cs
+++ b/KerbalEngineer/VesselSimulator/PartSim.cs
@@ -32,6 +32,8 @@
 
 namespace KerbalEngineer.VesselSimulator
 {
+    using CompoundParts;
+
     public class PartSim
     {
         private readonly List<AttachNodeSim> attachNodes = new List<AttachNodeSim>();
@@ -86,7 +88,7 @@
             this.fuelCrossFeed = this.part.fuelCrossFeed;
             this.noCrossFeedNodeKey = this.part.NoCrossFeedNodeKey;
             this.decoupledInStage = this.DecoupledInStage(this.part);
-            this.isFuelLine = this.part is FuelLine;
+            this.isFuelLine = this.part.HasModule<CModuleFuelLine>();
             this.isFuelTank = this.part is FuelTank;
             this.isSepratron = this.IsSepratron();
             this.inverseStage = this.part.inverseStage;

--- a/KerbalEngineer/VesselSimulator/Simulation.cs
+++ b/KerbalEngineer/VesselSimulator/Simulation.cs
@@ -30,6 +30,9 @@
 
 namespace KerbalEngineer.VesselSimulator
 {
+    using CompoundParts;
+    using Extensions;
+
     public class Simulation
     {
         private const double STD_GRAVITY = 9.82;
@@ -192,10 +195,11 @@
             {
                 foreach (PartSim partSim in this.allFuelLines)
                 {
-                    if ((partSim.part as FuelLine).target != null)
+                    CModuleFuelLine fuelLine = partSim.part.GetModule<CModuleFuelLine>();
+                    if (fuelLine.target != null)
                     {
                         PartSim targetSim;
-                        if (partSimLookup.TryGetValue((partSim.part as FuelLine).target, out targetSim))
+                        if (partSimLookup.TryGetValue(fuelLine.target, out targetSim))
                         {
                             if (log != null)
                             {

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ
--- a/Output/KerbalEngineer/KerbalEngineer.version
+++ b/Output/KerbalEngineer/KerbalEngineer.version
@@ -5,13 +5,13 @@
 	{
 		"MAJOR":1,
 		"MINOR":0,
-		"PATCH":12,
+		"PATCH":13,
 		"BUILD":0
 	},
 	"KSP_VERSION":
 	{
 		"MAJOR":0,
-		"MINOR":25,
+		"MINOR":90,
 		"PATCH":0
 	}
 }