/** * Check whether a mech has intact heat-dissipating armor in every location * thus protecting it from external heat sources like fires or magma * * @return True/False */ public boolean hasIntactHeatDissipatingArmor() { for (int loc = 0; loc < locations(); ++loc) { if ((getArmor(loc) < 1) || (getArmorType(loc) != EquipmentType.T_ARMOR_HEAT_DISSIPATING)) { return false; } } return true; }
private static Armor[] getArmor(Mech mech) { Armor[] armor; if (!mech.hasPatchworkArmor()) { armor = new Armor[1]; int type = mech.getArmorType(1); int flag = 0; if (mech.isClanArmor(1)) { flag |= Armor.CLAN_ARMOR; } armor[0] = new Armor(type, flag); return armor; } else { armor = new Armor[mech.locations()]; for (int i = 0; i < mech.locations(); i++) { int type = mech.getArmorType(i); int flag = 0; if (mech.isClanArmor(i)) { flag |= Armor.CLAN_ARMOR; } armor[i] = new Armor(type, flag); } } return armor; }
} else { sb.append("Armor:").append( EquipmentType.getArmorTypeName(getArmorType(0))); sb.append("(" + TechConstants.getTechName(getArmorTechLevel(0)) + ")"); if (hasPatchworkArmor()) { sb.append( EquipmentType.getArmorTypeName(getArmorType(element), isClan())) .append('(')
switch (getArmorType(loc)) { case EquipmentType.T_ARMOR_COMMERCIAL: armorMultiplier = 0.5;
if (mech.getArmorType(0) != EquipmentType.T_ARMOR_COMMERCIAL) { buff.append("primitive industrialmechs must mount commercial armor\n"); illegal = true; if ((mech.getArmorType(0) != EquipmentType.T_ARMOR_PRIMITIVE) && (mech.getArmorType(0) != EquipmentType.T_ARMOR_INDUSTRIAL)) { buff.append("primitive battlemechs must mount primitive battlemech armor\n"); illegal = true; ats.add(mech.getArmorType(i)); int armor = mech.getArmorType(loc); switch (armor) { case EquipmentType.T_ARMOR_STANDARD: