@Override public void fix() { super.fix(); Bay bay = getBay(); if (null != bay) { bay.setBayDamage(0); } }
String nodeName = currNode.getNodeName(); if (nodeName.equalsIgnoreCase(BAYDAMAGE)) { currentbay.setBayDamage(Double.parseDouble(currNode.getTextContent())); } else if (nodeName.equalsIgnoreCase(BAYDOORS)) { currentbay.setCurrentDoors(Integer.parseInt(currNode.getTextContent()));
@Override public void updateConditionFromPart() { Bay bay = getBay(); if (null != bay) { int goodDoors = 0; int badCubicles = 0; for (int id : childPartIds) { final Part p = campaign.getPart(id); if (null != p) { if ((p instanceof BayDoor) && !p.needsFixing()) { goodDoors++; } else if (p instanceof MissingCubicle) { badCubicles++; } } } bay.setCurrentDoors(goodDoors); // Even if the bay is repaired, it still has reduced capacity until the cubicles are replaced. bay.setBayDamage(Math.max(hits, badCubicles)); } }
continue; bay.setBayDamage(bay.getCapacity() - (Double) bayCrit.getModel().getValue()); CheckCritPanel doorCrit = bayDoorCrit[b]; if (null == doorCrit) {