Skip to content

Commit

Permalink
Fix stage:solidfuel
Browse files Browse the repository at this point in the history
StageValue.cs
* Update the GetResourceOfCurrentStage method to return the
PartResources contained within an engine in the case of NO_FLOW flow
mode.
  • Loading branch information
hvacengi committed Nov 6, 2015
1 parent 374ea10 commit dc2c3d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kOS/Suffixed/StageValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ private bool IsResource(string suffixName)
engine.GetConnectedResources(resourceDef.id, resourceDef.resourceFlowMode, list);
}
}
else if (resourceDef.resourceFlowMode == ResourceFlowMode.NO_FLOW) {
var engines = VesselUtils.GetListOfActivatedEngines(shared.Vessel);
foreach (var engine in engines)
{
list.AddRange(engine.Resources.GetAll(resourceDef.id));
}
}
else
{
shared.Vessel.rootPart.GetConnectedResources(resourceDef.id, resourceDef.resourceFlowMode, list);
Expand Down

0 comments on commit dc2c3d0

Please sign in to comment.