Commit dcaf458
authored
Fix for Issue MegaMek#7794 - Incorrect BV mod for IS BA Reactive Armor. (MegaMek#7801)
Root Cause: The isReactive(), isFireResistant(), and isReflective()
methods in BattleArmor.java were checking for misc equipment flags, but
BA special armor types are stored as armor types (via getArmorType()),
not as misc equipment. The old code never matched anything.
Fix: Simplified all three methods to directly check the armor type:
```
public boolean isFireResistant() {
return getArmorType(LOC_TROOPER_1) == EquipmentType.T_ARMOR_BA_FIRE_RESIST;
}
public boolean isReflective() {
return getArmorType(LOC_TROOPER_1) == EquipmentType.T_ARMOR_BA_REFLECTIVE;
}
public boolean isReactive() {
return getArmorType(LOC_TROOPER_1) == EquipmentType.T_ARMOR_BA_REACTIVE;
}
```
File changed: megamek/src/megamek/common/battleArmor/BattleArmor.java
Fixes MegaMek#77941 file changed
+3
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | | - | |
1314 | 1313 | | |
1315 | 1314 | | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
| 1315 | + | |
1322 | 1316 | | |
1323 | 1317 | | |
1324 | 1318 | | |
1325 | 1319 | | |
1326 | | - | |
1327 | 1320 | | |
1328 | 1321 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
| 1322 | + | |
1335 | 1323 | | |
1336 | 1324 | | |
1337 | 1325 | | |
1338 | 1326 | | |
1339 | | - | |
1340 | 1327 | | |
1341 | 1328 | | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1329 | + | |
1348 | 1330 | | |
1349 | 1331 | | |
1350 | 1332 | | |
| |||
0 commit comments