Can't have direct pod children of pod
This commit is contained in:
parent
e1ab350624
commit
ddb73b5ca1
@ -39,9 +39,8 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
||||
@XmlElementRefs({
|
||||
@XmlElementRef(name = RockSimCommonConstants.BODY_TUBE, type = BodyTubeDTO.class),
|
||||
@XmlElementRef(name = RockSimCommonConstants.NOSE_CONE, type = NoseConeDTO.class),
|
||||
@XmlElementRef(name = RockSimCommonConstants.TRANSITION, type = TransitionDTO.class),
|
||||
@XmlElementRef(name = RockSimCommonConstants.EXTERNAL_POD, type = PodSetDTO.class)})
|
||||
List<BasePartDTO> attachedParts = new ArrayList<BasePartDTO>();
|
||||
@XmlElementRef(name = RockSimCommonConstants.TRANSITION, type = TransitionDTO.class)})
|
||||
List<BasePartDTO> attachedParts = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
@ -89,15 +88,7 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
||||
addAngleOffsetToChildren(theORPodSet, angleOffset);
|
||||
|
||||
for (RocketComponent child : theORPodSet.getChildren()) {
|
||||
if (child instanceof PodSet) {
|
||||
for (PodSetDTO podSetDTO : generatePodSetDTOs((PodSet) child)) {
|
||||
addAttachedPart(podSetDTO);
|
||||
}
|
||||
} else if (child instanceof ParallelStage) {
|
||||
for (ParallelStageDTO parallelStageDTO : ParallelStageDTO.generateParallelStageDTOs((ParallelStage) child)) {
|
||||
addAttachedPart(parallelStageDTO);
|
||||
}
|
||||
} else if (child instanceof BodyTube) {
|
||||
if (child instanceof BodyTube) {
|
||||
addAttachedPart(new BodyTubeDTO((BodyTube) child));
|
||||
} else if (child instanceof NoseCone) {
|
||||
if (((NoseCone) child).isFlipped()) {
|
||||
@ -161,14 +152,6 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
||||
attachedParts.remove(part);
|
||||
}
|
||||
|
||||
public boolean isEjected() {
|
||||
return isEjected;
|
||||
}
|
||||
|
||||
public void setEjected(boolean ejected) {
|
||||
isEjected = ejected;
|
||||
}
|
||||
|
||||
public boolean isDetachable() {
|
||||
return isDetachable;
|
||||
}
|
||||
@ -176,4 +159,12 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
||||
public void setDetachable(boolean detachable) {
|
||||
isDetachable = detachable;
|
||||
}
|
||||
|
||||
public boolean isEjected() {
|
||||
return isEjected;
|
||||
}
|
||||
|
||||
public void setEjected(boolean ejected) {
|
||||
isEjected = ejected;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user