Merge remote-tracking branch 'cybutek/master'
Merge remote-tracking branch 'cybutek/master'

--- a/EngineSim.cs
+++ b/EngineSim.cs
@@ -433,7 +433,9 @@
                             log = new LogMsg();
                             log.buf.AppendLine("Find " + ResourceContainer.GetResourceName(type) + " sources for " + partSim.name + ":" + partSim.partId);
                         }
-                        partSim.GetSourceSet(type, PhysicsGlobals.Stack_PriUsesSurf, allParts, visited, sourcePartSet, log, "");
+
+                        // TODO: check fuel flow as 'PhysicsGlobals.Stack_PriUsesSurf' changed to false to subdue error
+                        partSim.GetSourceSet(type, false, allParts, visited, sourcePartSet, log, "");
                         if (SimManager.logOutput && log != null)
                         {
                             MonoBehaviour.print(log.buf);

file:a/PartSim.cs -> file:b/PartSim.cs
--- a/PartSim.cs
+++ b/PartSim.cs
@@ -119,7 +119,6 @@
             partSim.noCrossFeedNodeKey = p.NoCrossFeedNodeKey;
             partSim.decoupledInStage = partSim.DecoupledInStage(p);
             partSim.isFuelLine = p.HasModule<CModuleFuelLine>();
-            partSim.isFuelTank = p is FuelTank;
             partSim.isSepratron = partSim.IsSepratron();
             partSim.inverseStage = p.inverseStage;
             //MonoBehaviour.print("inverseStage = " + inverseStage);
@@ -788,23 +787,9 @@
                 return false;
             }
 
-            if (part is SolidRocket)
-            {
-                return true;
-            }
-
             IEnumerable<ModuleEngines> modList = part.Modules.OfType<ModuleEngines>();
-            if (modList.Count() == 0)
-            {
-                return false;
-            }
-
-            if (modList.First().throttleLocked)
-            {
-                return true;
-            }
-
-            return false;
+
+            return modList.Any(module => module.throttleLocked);
         }
     }
 }

--- a/SimManager.cs
+++ b/SimManager.cs
@@ -306,7 +306,7 @@
             }
             catch (Exception e)
             {
-                Logger.Exception(e, "SimManager.RunSimulation()");
+                MyLogger.Exception(e, "SimManager.RunSimulation()");
                 Stages = null;
                 LastStage = null;
                 failMessage = e.ToString();
@@ -386,7 +386,7 @@
             }
             catch (Exception e)
             {
-                Logger.Exception(e, "SimManager.StartSimulation()");
+                MyLogger.Exception(e, "SimManager.StartSimulation()");
                 failMessage = e.ToString();
                 lock (locker)
                 {

--- a/Simulation.cs
+++ b/Simulation.cs
@@ -570,10 +570,10 @@
                         MonoBehaviour.print("stageStartMass = " + this.stageStartMass);
                         MonoBehaviour.print("stepStartMass = " + this.stepStartMass);
                         MonoBehaviour.print("StepEndMass   = " + this.stepEndMass);
-                        Logger.Log("exceeded loop count");
-                        Logger.Log("stageStartMass = " + this.stageStartMass);
-                        Logger.Log("stepStartMass = " + this.stepStartMass);
-                        Logger.Log("StepEndMass   = " + this.stepEndMass);
+                        MyLogger.Log("exceeded loop count");
+                        MyLogger.Log("stageStartMass = " + this.stageStartMass);
+                        MyLogger.Log("stepStartMass = " + this.stepStartMass);
+                        MyLogger.Log("StepEndMass   = " + this.stepEndMass);
                         break;
                     }