public void setOnFire(boolean inferno) { infernoFire |= inferno; burningLocations = (1 << locations()) - 1; extinguishLocation(LOC_BODY); }
@Override public void autoSetInternal() { int nInternal = (int) Math.ceil(weight / 10.0); // No internals in the body location. initializeInternal(IArmorState.ARMOR_NA, LOC_BODY); for (int x = 1; x < locations(); x++) { initializeInternal(nInternal, x); } }
panSystem.add(motiveCrit, gridBagConstraints); stabilizerCrits = new CheckCritPanel[tank.locations()]; for (int loc = 0; loc < tank.locations(); loc++) { if ((loc == Tank.LOC_BODY) || (loc == tank.getLocTurret()) || (loc == tank.getLocTurret2())) { gridBagConstraints.weightx = 0.0; gridBagConstraints.weighty = 0.0; if (loc == (tank.locations() - 1)) { gridBagConstraints.weighty = 1.0;
private static Armor[] getArmor(Tank tank) { Armor[] armor; if (!tank.hasPatchworkArmor()) { armor = new Armor[1]; int type = tank.getArmorType(1); int flag = 0; if (tank.isClanArmor(1)) { flag |= Armor.CLAN_ARMOR; } armor[0] = new Armor(type, flag); return armor; } else { armor = new Armor[tank.locations()]; for (int i = 0; i < tank.locations(); i++) { int type = tank.getArmorType(1); int flag = 0; if (tank.isClanArmor(1)) { flag |= Armor.CLAN_ARMOR; } armor[i] = new Armor(type, flag); } } return armor; }
double armorMultiplier = 1.0; for (int loc = 1; loc < locations(); loc++) { int modularArmor = 0; for (Mounted mounted : getEquipment()) {
for (int loc = 0; loc < tank.locations(); loc++) { int count = 0; for (Mounted misc : tank.getMisc()) {
@Override public double getCost(boolean ignoreAmmo) { double[] costs = new double[13 + locations()]; int i = 0; for (int loc = 0; loc < locations(); loc++) { totalArmorPoints += getOArmor(loc); } else { if (hasPatchworkArmor()) { for (int loc = 0; loc < locations(); loc++) { costs[i++] = getArmorWeight(loc)
|| (tank.getMovementMode() == EntityMovementMode.WIGE) || (tank.getMovementMode() == EntityMovementMode.HOVER)) { for (int i = 0; i < tank.locations(); i++) { if (tank.getArmorType(i) == EquipmentType.T_ARMOR_HARDENED) { buff.append("Hardened armor can't be mounted on WiGE/Hover/Wheeled vehicles\n");
for (int loc = 0; loc < tank.locations(); loc++) { CheckCritPanel stabCrit = stabilizerCrits[loc]; if (null == stabCrit) {
for (int i = 1; i < t.locations(); i++) { t.setArmorType(dataFile.getDataAsInt(t.getLocationName(i) + "_armor_type")[0], i); t.setArmorTechLevel(dataFile.getDataAsInt(t.getLocationName(i) + "_armor_type")[0], i);