/** * @return A description of the status of a single crew member */ public String getStatusDesc(int pos) { if (isMissing(pos)) { return "Missing"; } String s = new String(""); if (getHits(pos) > 0) { s += hits[pos] + " hits"; if (isUnconscious(pos)) { s += " (KO)"; } else if (isDead(pos)) { s += " (dead)"; } } return s; }
private static String formatHeader(Entity e) { StringBuffer sb = new StringBuffer(1024); sb.append("Model: ").append(e.getChassis()).append(" - ") .append(e.getModel()).append(CommonConstants.NL); for (int i = 0; i < e.getCrew().getSlotCount(); i++) { if (e.getCrew().isMissing(i)) { sb.append("No ").append(e.getCrew().getCrewType().getRoleName(i)); } else { sb.append(e.getCrew().getCrewType().getRoleName(i)).append(": ") .append(e.getCrew().getName(i)); sb.append(" (").append(e.getCrew().getGunnery(i)).append("/") .append(e.getCrew().getPiloting(i)).append(")"); } sb.append(CommonConstants.NL); } if (e.isCaptured()) { sb.append(" *** CAPTURED BY THE ENEMY ***"); sb.append(CommonConstants.NL); } return sb.toString(); }
public String getDesc(int pos) { if (isMissing(pos)) { return "[missing]"; } String s = new String(name[pos]); if (hits[pos] > 0) { s += " (" + hits[pos] + " hit(s)"; if (isUnconscious(pos)) { s += " [ko]"; } else if (isDead(pos)) { s += " [dead]"; } s += ")"; } else if (isUnconscious(pos)) { s += " [ko]"; } else if (isDead(pos)) { s += " [dead]"; } return s; }
if (crew.isMissing(pos)) { continue;
if (entity.getCrew().isMissing(i)) { continue;
chkMissing.addActionListener(parent); chkMissing.addActionListener(e -> missingToggled()); chkMissing.setSelected(entity.getCrew().isMissing(slot)); add(chkMissing, GBC.eop());
String pnameStr = "Pilot"; if (entity.getCrew().isMissing(i)) { continue;
refreshLAMPilot(); if (entity.getCrew().isMissing(0)) { return;
pilotL.setString(Messages.getString("PilotMapSet.pilotL")); if (en.getCrew().isMissing(slot)) { nameL.setString(Messages.getString("PilotMapSet.empty")); nickL.setString(""); && !en.getCrew().isMissing(slot)) { toughBR.setString(Integer.toString(en.getCrew().getToughness(slot))); } else { && !en.getCrew().isMissing(slot)) { initBR.setString(Integer.toString(en.getCrew().getInitBonus())); } else { && !en.getCrew().isMissing(slot)) { commandBR.setString(Integer.toString(en.getCrew().getCommandBonus())); } else { commandBR.setVisible(false); if (en.getCrew().isMissing(slot)) { hitsR.setString(""); } else {
if (!blindDrop && pilot.getSlotCount() > 1) { for (int i = 0; i < pilot.getSlotCount(); i++) { if (pilot.isMissing(i)) { value += "<b>No " + pilot.getCrewType().getRoleName(i) + "</b>"; } else {