From c770b616e9bd3a6fc84ab5d5f15e7b8c4c2cf49b Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 22 Jul 2023 23:59:50 +0200 Subject: [PATCH] TestMech: Correction to internal structure validation --- megamek/src/megamek/common/verifier/TestMech.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/megamek/src/megamek/common/verifier/TestMech.java b/megamek/src/megamek/common/verifier/TestMech.java index b00dc2b0e95..24a6c7d5b6f 100755 --- a/megamek/src/megamek/common/verifier/TestMech.java +++ b/megamek/src/megamek/common/verifier/TestMech.java @@ -1473,7 +1473,8 @@ && countCriticalSlotsFromEquipInLocation(mech, m, loc) != 1) { // Test if the crit slots for internal structure match the required crits; Note that this intentionally // counts crit slots, not mounted equipment as the latter only works with a fully loaded unit in MML and // will make units appear invalid during loading (MML calls UnitUtil.expandUnitMounts() after loading) - String structureName = EquipmentType.getStructureTypeName(mech.getStructureType(), mech.isClan()); + String structureName = EquipmentType.getStructureTypeName(mech.getStructureType(), + TechConstants.isClan(mech.getStructureTechLevel())); EquipmentType structure = EquipmentType.get(structureName); int requiredStructureCrits = structure.getCriticals(mech); if (mech.getNumberOfCriticals(structure) != requiredStructureCrits) {