public void restoreAllDoors() { setCurrentDoors(getDoors()); }
public void restoreDoor() { if (getCurrentDoors() < getDoors()) { setCurrentDoors(getCurrentDoors() + 1); } }
@Override public void fix() { super.fix(); Part bayPart = campaign.getPart(parentPartId); if (null != bayPart) { Bay bay = ((TransportBayPart) bayPart).getBay(); if (null != bay) { bay.setCurrentDoors(Math.min(bay.getCurrentDoors() + 1, bay.getDoors())); } } }
protected void addTransportBays(Entity entity) { final List<Map<String, Object>> bays = new ArrayList<>(); for (final Bay bay : entity.getTransportBays()) { if (bay.isQuarters()) { continue; } final BayData bayData = BayData.getBayType(bay); if (null != bayData) { final Map<String, Object> bayRow = new HashMap<>(); bayRow.put("name", bayData.getDisplayName()); if (bayData.isCargoBay()) { bayRow.put("size", bay.getCapacity() + Messages.getString("TROView.tons")); } else { bayRow.put("size", (int) bay.getCapacity()); } bayRow.put("doors", bay.getDoors()); bays.add(bayRow); } else { DefaultMmLogger.getInstance().warning(getClass(), "addBays()", "Could not determine bay type for " + bay.toString()); } } setModelData("bays", bays); }
oldUnit.addPart(bayPart); oldUnit.campaign.addPart(bayPart, 0); for (int i = 0; i < bay.getDoors(); i++) { Part door; if (doors.size() > 0) {
final Bay newbay = newbays.next(); if ((oldbay.getCapacity() == newbay.getCapacity()) && (oldbay.getDoors() == newbay.getDoors())) { oldbays.remove(); newbays.remove(); final Bay newbay = newbays.next(); if (oldbay.getCapacity() == newbay.getCapacity()) { if (oldbay.getDoors() > newbay.getDoors()) { doorsRemoved += oldbay.getDoors() - newbay.getDoors(); } else { doorsAdded += newbay.getDoors() - oldbay.getDoors();
addPart(bayPart); partsToAdd.add(bayPart); for (int i = 0; i < bay.getDoors(); i++) { Part door = new BayDoor((int) entity.getWeight(), campaign); bayPartsToAdd.get(bay.getBayNumber()).add(door); || (p instanceof MissingBayDoor))) .collect(Collectors.toList()); while (bay.getDoors() > doors.size()) { Part door = new MissingBayDoor((int) entity.getWeight(), campaign); bayPartsToAdd.get(bay.getBayNumber()).add(door);
int bayCost = 0; for (Bay next : getTransportBays()) { baydoors += next.getDoors(); if ((next instanceof MechBay) || (next instanceof ASFBay) || (next instanceof SmallCraftBay)) { bayCost += 20000 * next.totalSpace;
int bayCost = 0; for (Bay next : getTransportBays()) { baydoors += next.getDoors(); if ((next instanceof MechBay) || (next instanceof ASFBay) || (next instanceof SmallCraftBay)) { bayCost += 20000 * next.totalSpace;
int bayCost = 0; for (Bay next : getTransportBays()) { baydoors += next.getDoors(); if ((next instanceof MechBay) || (next instanceof ASFBay) || (next instanceof SmallCraftBay)) { bayCost += 20000 * next.totalSpace;
int bayCost = 0; for (Bay next : getTransportBays()) { baydoors += next.getDoors(); if ((next instanceof MechBay) || (next instanceof ASFBay) || (next instanceof SmallCraftBay)) { bayCost += 20000 * next.totalSpace;
int bayCost = 0; for (Bay next : js.getTransportBays()) { baydoors += next.getDoors(); if ((next instanceof MechBay) || (next instanceof ASFBay) || (next instanceof SmallCraftBay)) { bayCost += 20000 * next.getCapacity();