Update recovery device import rules
Apparently RASAero doesn't support recovery devices in other stages
This commit is contained in:
parent
eb65266fe8
commit
8dbae85bc3
@ -196,8 +196,6 @@ public class RecoveryHandler extends AbstractElementHandler {
|
||||
* put recovery device 2 in the second body tube (about 1.125 calibers below the top of the second body tube).
|
||||
* 3. If the airframe has three or more body tubes:
|
||||
* put recovery device 2 in the third body tube (about 1.125 calibers below the top of the third body tube).
|
||||
* 4. If the airframe has one or more boosters (regardless of the number of body tubes in the sustainer):
|
||||
* put recovery device 2 in the first booster tube (about 1.125 calibers below the top of the first booster tube).
|
||||
* @param recoveryDevice the recovery device to add
|
||||
* @param warnings the warning set to add import warnings to
|
||||
*/
|
||||
@ -205,7 +203,6 @@ public class RecoveryHandler extends AbstractElementHandler {
|
||||
final BodyTube bodyTube;
|
||||
double offset;
|
||||
|
||||
if (rocket.getStageCount() == 1) {
|
||||
AxialStage sustainer = rocket.getStage(0);
|
||||
|
||||
// Get all body tubes
|
||||
@ -237,23 +234,6 @@ public class RecoveryHandler extends AbstractElementHandler {
|
||||
offset = bodyTube.getOuterRadius() * 1.125;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// If there are multiple stages, add the recovery device to the first booster
|
||||
AxialStage booster1 = rocket.getStage(1);
|
||||
BodyTube boosterTube = null;
|
||||
for (int i = 0; i < booster1.getChildCount(); i++) {
|
||||
if (booster1.getChild(i) instanceof BodyTube) {
|
||||
boosterTube = (BodyTube) booster1.getChild(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (boosterTube == null) {
|
||||
warnings.add("No booster body tube found." + recoveryDevice.getName() + " will not be added to the rocket.");
|
||||
return;
|
||||
}
|
||||
bodyTube = boosterTube;
|
||||
offset = bodyTube.getOuterRadius() * 1.125;
|
||||
}
|
||||
|
||||
// Add the recovery device to the rocket
|
||||
bodyTube.addChild(recoveryDevice);
|
||||
|
Loading…
x
Reference in New Issue
Block a user