Skip to content

Commit

Permalink
fix slot counting validation on PM
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Sep 15, 2024
1 parent ca83714 commit 9304ef4
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 9304ef4

Please sign in to comment.