Replace stage active flag checks with isStageActive
This is more reliable as it takes other factors into account (e.g. if the stage has no children)
This commit is contained in:
parent
26414da9f7
commit
08116c3d32
@ -399,7 +399,7 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
public AxialStage getBottomStage() {
|
public AxialStage getBottomStage() {
|
||||||
AxialStage bottomStage = null;
|
AxialStage bottomStage = null;
|
||||||
for (StageFlags curFlags : this.stages.values()) {
|
for (StageFlags curFlags : this.stages.values()) {
|
||||||
if (curFlags.active) {
|
if (isStageActive(curFlags.stageNumber)) {
|
||||||
bottomStage = rocket.getStage( curFlags.stageNumber);
|
bottomStage = rocket.getStage( curFlags.stageNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -843,7 +843,7 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
buf.append(String.format(fmt, "#", "?actv", "Name"));
|
buf.append(String.format(fmt, "#", "?actv", "Name"));
|
||||||
for (StageFlags flags : stages.values()) {
|
for (StageFlags flags : stages.values()) {
|
||||||
final int stageNumber = flags.stageNumber;
|
final int stageNumber = flags.stageNumber;
|
||||||
buf.append(String.format(fmt, stageNumber, (flags.active?" on": "off"), rocket.getStage( stageNumber).getName()));
|
buf.append(String.format(fmt, stageNumber, (isStageActive(flags.stageNumber) ?" on": "off"), rocket.getStage( stageNumber).getName()));
|
||||||
}
|
}
|
||||||
buf.append("\n");
|
buf.append("\n");
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user