/** * @return only entities in that can be unloaded on ground */ public Vector<Entity> getUnitsUnloadableFromBays() { 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 Bay) && (((Bay) next).canUnloadUnits())) { Bay nextbay = (Bay) next; for (Entity e : nextbay.getUnloadableUnits()) { if (!e.wasLoadedThisTurn()) { result.addElement(e); } } } } // Return the list. return result; }