Skip to content

Commit

Permalink
Merge pull request #6008 from MegaMek/testproto-slot-counting-fix
Browse files Browse the repository at this point in the history
Fix slot counting validation for PM
  • Loading branch information
SJuliez authored Sep 16, 2024
2 parents 14184a4 + 9304ef4 commit 803a80a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion megamek/src/megamek/common/verifier/TestProtoMek.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ public boolean hasIllegalEquipmentCombinations(StringBuffer buff) {
Map<Integer, Double> weightByLoc = new HashMap<>();
int meleeWeapons = 0;
for (Mounted<?> mount : proto.getEquipment()) {
if (!requiresSlot(mount.getType())) {
if (!requiresSlot(mount.getType()) || (mount.getType() instanceof ArmorType)) {
// armor is added separately
continue;
}
slotsByLoc.merge(mount.getLocation(), 1, Integer::sum);
Expand Down

0 comments on commit 803a80a

Please sign in to comment.