@Override public String getName() { if (null != getBay()) { return getBay().getType() + " Bay #" + bayNumber; } return super.getName(); }
/** * Damages a randomly determined bay door on the entity, if one exists */ public String damageBayDoor() { String bayType = "none"; Vector<Bay> potential; potential = new Vector<Bay>(); Enumeration<Transporter> iter = transports.elements(); while (iter.hasMoreElements()) { Transporter next = iter.nextElement(); if (next instanceof Bay) { Bay nextBay = (Bay) next; if (nextBay.getCurrentDoors() > 0) { potential.add(nextBay); } } } if (potential.size() > 0) { Bay chosenBay = potential.elementAt(Compute.randomInt(potential .size())); chosenBay.destroyDoor(); chosenBay.resetDoors(); chosenBay.setCurrentDoors(chosenBay.getCurrentDoors() - 1); bayType = chosenBay.getType(); } return bayType; }
if (bay.hardpointCost() > 0) { if ((bay.getFacing() < 0) || (bay.getFacing() >= Warship.LOC_LBS)) { buffer.append(bay.getType() + " is not assigned a legal armor facing.\n"); legal = false; } else if (facings.contains(bay.getFacing())) {
Messages.getString( "MovementDisplay.DropUnitDialog.title", new Object[]{ //$NON-NLS-1$ currentBay.getType(), bayNum}), question, names, false, doors); choiceDialog.setVisible(true);
gridBagConstraints.gridy++; gridBagConstraints.weightx = 0.0; panSystem.add(new JLabel("<html><b>" + nextbay.getType() + " Bay # " + nextbay.getBayNumber() + "</b><br></html>"), gridBagConstraints);
Messages.getString( "MovementDisplay.LaunchFighterDialog.title", new Object[]{ //$NON-NLS-1$ currentBay.getType(), bayNum}), question, names); choiceDialog.setVisible(true);