public Vector<Entity> getLaunchableSmallCraft() { Vector<Entity> result = new Vector<Entity>(); // Walk through this entity's transport components; // add all of their lists to ours. for (Transporter next : transports) { if ((next instanceof SmallCraftBay) && (((SmallCraftBay) next).getCurrentDoors() > 0)) { Bay nextbay = (Bay) next; for (Entity e : nextbay.getLaunchableUnits()) { result.addElement(e); } } } // Return the list. return result; }
/** * @return only entities in ASF Bays that can be launched (i.e. not in * recovery) */ public Vector<Entity> getLaunchableFighters() { Vector<Entity> result = new Vector<Entity>(); // Walk through this entity's transport components; // add all of their lists to ours. // I should only add entities in bays that are functional for (Transporter next : transports) { if ((next instanceof ASFBay) && (((ASFBay) next).getCurrentDoors() > 0)) { Bay nextbay = (Bay) next; for (Entity e : nextbay.getLaunchableUnits()) { result.addElement(e); } } } // Return the list. return result; }
currentBay = FighterBays.elementAt(i); Vector<Integer> bayChoices = new Vector<Integer>(); currentFighters = currentBay.getLaunchableUnits();