Skip to content

Commit

Permalink
Merge pull request #6489 from MegaMek/validate-capacitors
Browse files Browse the repository at this point in the history
PPC Capacitors must all be linked to a PPC
  • Loading branch information
rjhancock authored Feb 5, 2025
2 parents 54e105c + f0c8646 commit 8733a24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions megamek/src/megamek/common/verifier/TestEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,15 @@ public boolean hasIllegalEquipmentCombinations(StringBuffer buff) {
artemisP++;
} else if (m.getType().hasFlag(MiscType.F_APOLLO)) {
apollo++;
} else if (m.getType().hasFlag(MiscType.F_PPC_CAPACITOR)) {
if (m.getLinked() == null) {
buff
.append(m.getType().getName())
.append(" in ")
.append(getEntity().getLocationAbbr(m.getLocation()))
.append(" has no linked PPC\n");
illegal = true;
}
}

if (m.getType().hasFlag(MiscType.F_LASER_INSULATOR) &&
Expand Down

0 comments on commit 8733a24

Please sign in to comment.