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({
|
@XmlElementRefs({
|
||||||
@XmlElementRef(name = RockSimCommonConstants.BODY_TUBE, type = BodyTubeDTO.class),
|
@XmlElementRef(name = RockSimCommonConstants.BODY_TUBE, type = BodyTubeDTO.class),
|
||||||
@XmlElementRef(name = RockSimCommonConstants.NOSE_CONE, type = NoseConeDTO.class),
|
@XmlElementRef(name = RockSimCommonConstants.NOSE_CONE, type = NoseConeDTO.class),
|
||||||
@XmlElementRef(name = RockSimCommonConstants.TRANSITION, type = TransitionDTO.class),
|
@XmlElementRef(name = RockSimCommonConstants.TRANSITION, type = TransitionDTO.class)})
|
||||||
@XmlElementRef(name = RockSimCommonConstants.EXTERNAL_POD, type = PodSetDTO.class)})
|
List<BasePartDTO> attachedParts = new ArrayList<>();
|
||||||
List<BasePartDTO> attachedParts = new ArrayList<BasePartDTO>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor.
|
* Default constructor.
|
||||||
@ -89,15 +88,7 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
|||||||
addAngleOffsetToChildren(theORPodSet, angleOffset);
|
addAngleOffsetToChildren(theORPodSet, angleOffset);
|
||||||
|
|
||||||
for (RocketComponent child : theORPodSet.getChildren()) {
|
for (RocketComponent child : theORPodSet.getChildren()) {
|
||||||
if (child instanceof PodSet) {
|
if (child instanceof BodyTube) {
|
||||||
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) {
|
|
||||||
addAttachedPart(new BodyTubeDTO((BodyTube) child));
|
addAttachedPart(new BodyTubeDTO((BodyTube) child));
|
||||||
} else if (child instanceof NoseCone) {
|
} else if (child instanceof NoseCone) {
|
||||||
if (((NoseCone) child).isFlipped()) {
|
if (((NoseCone) child).isFlipped()) {
|
||||||
@ -161,14 +152,6 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
|||||||
attachedParts.remove(part);
|
attachedParts.remove(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEjected() {
|
|
||||||
return isEjected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEjected(boolean ejected) {
|
|
||||||
isEjected = ejected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDetachable() {
|
public boolean isDetachable() {
|
||||||
return isDetachable;
|
return isDetachable;
|
||||||
}
|
}
|
||||||
@ -176,4 +159,12 @@ public class PodSetDTO extends BasePartDTO implements AttachableParts {
|
|||||||
public void setDetachable(boolean detachable) {
|
public void setDetachable(boolean detachable) {
|
||||||
isDetachable = detachable;
|
isDetachable = detachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEjected() {
|
||||||
|
return isEjected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEjected(boolean ejected) {
|
||||||
|
isEjected = ejected;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user