Second component can also be boattail

This commit is contained in:
SiboVG 2023-04-06 23:21:57 +02:00
parent c7aa226995
commit c698332372
2 changed files with 3 additions and 2 deletions

View File

@ -1406,7 +1406,7 @@ RASAeroExport.error19 = Inside diameter of '%s' must be greater than 0.
RASAeroExport.error20 = Fin set '%s' must have a fin count between 3 and 8.
RASAeroExport.error21 = RASAero only supports apogee and altitude deployment events for parachute '%s', not '%s'
RASAeroExport.error22 = First component of the sustainer must be a nose cone.
RASAeroExport.error23 = Second component of the sustainer must be a body tube.
RASAeroExport.error23 = Second component of the sustainer must be a body tube (or boattail).
RASAeroExport.error24 = A nose cone can only be the first component of the rocket.
RASAeroExport.error25 = Invalid stage number '%d' for simulation '%s'
RASAeroExport.error26 = RASAero only supports conical transitions.

View File

@ -90,7 +90,8 @@ public class RocketDesignDTO {
if (i == 0 && !(component instanceof NoseCone)) {
errors.add(trans.get("RASAeroExport.error22"));
return;
} else if (i == 1 && !(component instanceof BodyTube)) {
} else if (i == 1 && !(component instanceof BodyTube ||
(component instanceof Transition && !(component instanceof NoseCone) && (i == sustainer.getChildCount() - 1)))) {
errors.add(trans.get("RASAeroExport.error23"));
return;
}