Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestMech: Correction to internal structure validation #4660

Merged
merged 1 commit into from
Jul 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion megamek/src/megamek/common/verifier/TestMech.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down