public CriticalSlot(Mounted mount) { this(TYPE_EQUIPMENT, -1, mount.getType().isHittable(), mount .isArmored()); this.mount = mount; }
mounted.isArmored(), mounted.getLocation());
/** * Resets techAdvancement to initial value and adjusts for all installed equipment. */ public void recalculateTechAdvancement() { initTechAdvancement(); for (Mounted m : getEquipment()) { compositeTechLevel.addComponent(m.getType()); if (m.isArmored()) { compositeTechLevel.addComponent(TA_ARMORED_COMPONENT); } } }
if (isArmored()){ desc.append(" (armored)");
public CompositeTechLevel factionTechLevel(int techFaction) { if (techFaction == F_NONE) { return compositeTechLevel; } CompositeTechLevel retVal = new CompositeTechLevel(this, techFaction); addSystemTechAdvancement(retVal); for (Mounted m : getEquipment()) { retVal.addComponent(m.getType()); if (m.isArmored()) { retVal.addComponent(TA_ARMORED_COMPONENT); } } return retVal; }
@Override public long getStickerPrice() { //costs are a total nightmare //some costs depend on entity, but we can't do it that way //because spare parts don't have entities. If parts start on an entity //thats fine, but this will become problematic when we set up a parts //store. For now I am just going to pass in a null entity and attempt //to catch any resulting NPEs Entity en = null; boolean isArmored = false; if (unit != null) { en = unit.getEntity(); Mounted mounted = unit.getEntity().getEquipment(equipmentNum); if(null != mounted) { isArmored = mounted.isArmored(); } } int itemCost = 0; try { itemCost = (int) type.getCost(en, isArmored, -1); } catch(NullPointerException ex) { MekHQ.getLogger().error(AmmoStorage.class, "getStickerPrice", ex); } return itemCost; }
} else if (crit.getType() == CriticalSlot.TYPE_EQUIPMENT) { Mounted mount = crit.getMount(); if (mount.isArmored()) { specialAbilities.put(BattleForceSPA.ARM, null); break topLoop;
Mounted mounted = unit.getEntity().getEquipment(equipmentNum); if(null != mounted) { isArmored = mounted.isArmored();
if (mounted.isArmored()) { compositeTechLevel.addComponent(TA_ARMORED_COMPONENT);
&& ((MiscType) mounted.getType()).hasFlag(MiscType.F_BA_MANIPULATOR)) { long itemCost = (long) mounted.getType().getCost(this, mounted.isArmored(), mounted.getLocation()); manipulatorCost += itemCost;
if (!mount.isArmored() || ((mount.getType() instanceof MiscType) && ((MiscType) mount .getType()).hasFlag(MiscType.F_PPC_CAPACITOR))) {