Fixed STAGE_PRIORITY_FLOW resource disabling.
[VesselSimulator.git] / KerbalEngineer / VesselSimulator / EngineSim.cs
blob:a/KerbalEngineer/VesselSimulator/EngineSim.cs -> blob:b/KerbalEngineer/VesselSimulator/EngineSim.cs
--- a/KerbalEngineer/VesselSimulator/EngineSim.cs
+++ b/KerbalEngineer/VesselSimulator/EngineSim.cs
@@ -273,7 +273,7 @@
                         Logger.Log(type);
                         foreach (var aPartSim in allParts)
                         {
-                            if (aPartSim.resources[type] <= SimManager.RESOURCE_MIN) continue;
+                            if (aPartSim.resources[type] <= SimManager.RESOURCE_MIN || aPartSim.resourceFlowStates[type] == 0) continue;
 
                             var stage = aPartSim.DecouplerCount();
                             if (stage > maxStage)