private List<ViewElement> getBombs() { List<ViewElement> retVal = new ArrayList<>(); IBomber b = (IBomber) entity; int[] choices = b.getBombChoices(); for (int type = 0; type < BombType.B_NUM; type++) { if (choices[type] > 0) { retVal.add(new SingleLine(BombType.getBombName(type) + " (" + choices[type] + ")")); } } return retVal; }
String nodeName = currNode.getNodeName(); if (nodeName.equalsIgnoreCase(BOMB)){ int[] bombChoices = ((IBomber) entity).getBombChoices(); String type = currEle.getAttribute(TYPE); String load = currEle.getAttribute(LOAD);
private static String getBombChoiceString(IBomber bomber, int indentLvl) { String retVal = ""; int[] bombChoices = bomber.getBombChoices(); if (bombChoices.length > 0) { retVal += MekHqXmlUtil.indentStr(indentLvl+1) + "<bombs>\n"; for (int type = 0; type < BombType.B_NUM; type++) { if (bombChoices[type] > 0) { String typeName = BombType.getBombInternalName(type); retVal += MekHqXmlUtil.indentStr(indentLvl+2) + "<bomb type=\""; retVal += typeName; retVal += "\" load=\""; retVal += String.valueOf(bombChoices[type]); retVal += "\"/>\n"; } } retVal += MekHqXmlUtil.indentStr(indentLvl+1) + "</bombs>\n"; } return retVal; }
public BombsDialog(IBomber iBomber, Campaign campaign, JFrame parent) { super(parent, "Select Bombs", true); this.bomber = iBomber; this.campaign = campaign; bombChoices = bomber.getBombChoices(); initGUI(); validate(); pack(); setLocationRelativeTo(parent); }
maxPoints = bomber.getMaxBombPoints(); maxSize = bomber.getMaxBombSize(); int[] bombChoices = bomber.getBombChoices();
IBomber b = (IBomber)entity; int[] bombChoices = new int[BombType.B_NUM]; bombChoices = b.getBombChoices(); if (bombChoices.length > 0) { output.write(indentStr(indentLvl+1) + "<bombs>");
for (int i = 0; i < getBombChoices()[type]; i++) { int loc = availableBombLocation(BombType.bombCosts[type]); if ((type == BombType.B_ALAMO)
if (mountedBombs.size() > 0) { int[] bombChoices = bomber.getBombChoices(); for (Mounted m : mountedBombs) { if (!(m.getType() instanceof BombType)) {