/** * Determines if this object can accept the given unit. The unit may not be * of the appropriate type or there may be no room for the unit. * <p> * * @param unit * - the <code>Entity</code> to be loaded. * @return <code>true</code> if the unit can be loaded, <code>false</code> * otherwise. */ @Override public boolean canLoad(Entity unit) { // Assume that we can carry the unit. boolean result = true; // Only BattleArmor can be carried in BattleArmorHandles. if (!(unit instanceof BattleArmor)) { result = false; } // We must have enough space for the new troopers. else if (troopers != Entity.NONE) { result = false; } // The unit must be capable of doing mechanized BA else { result = ((BattleArmor) unit).canDoMechanizedBA(); } // Return our result. return result; }
@Override public boolean canMakeAntiMekAttacks() { return !isBurdened() && canDoMechanizedBA() && (getWeightClass() < EntityWeightClass.WEIGHT_HEAVY) && (getMovementMode() != EntityMovementMode.INF_UMU); }
if (canDoMechanizedBA()) { specialAbilities.put(BattleForceSPA.MEC, null);
(ba.canDoMechanizedBA() && (ba.getWeightClass() < EntityWeightClass.WEIGHT_HEAVY)) ? "Yes" : "No"); setModelData("mechanized", ba.canDoMechanizedBA() ? "Yes" : "No"); setModelData("antiPersonnel", ba.getEquipment().stream().anyMatch(m -> m.isAPMMounted()) ? "Yes" : "No");