From 92419ccc5c604c152ddb9d91be2a08d65f2651a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Oct 2023 01:10:33 -0400 Subject: [PATCH] partial tripod accommodation --- MekHQ/src/mekhq/campaign/parts/MekLocation.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MekHQ/src/mekhq/campaign/parts/MekLocation.java b/MekHQ/src/mekhq/campaign/parts/MekLocation.java index 67f1f98e62..6bce6a3c83 100644 --- a/MekHQ/src/mekhq/campaign/parts/MekLocation.java +++ b/MekHQ/src/mekhq/campaign/parts/MekLocation.java @@ -155,8 +155,12 @@ public double getTonnage() { // use MegaMek's implementation of internal structure weight calculation // assume rounding to nearest half-ton // superheavy flag is set if weight is more than 100 - // assume movement mode is biped (technically mechs can have other movement modes but that doesn't affect structure weight) - double tonnage = Structure.getWeightStructure(structureType, getUnitTonnage(), Ceil.HALFTON, (getUnitTonnage() > 100), EntityMovementMode.BIPED); + // assume movement mode is biped or tripod (technically mechs can have other movement modes but + // that doesn't affect structure weight); currently impossible to tell whether a "loose" left leg is for a biped or tripod. + EntityMovementMode movementMode = getLoc() == Mech.LOC_CLEG ? EntityMovementMode.TRIPOD : EntityMovementMode.BIPED; + + double tonnage = Structure.getWeightStructure(structureType, getUnitTonnage(), Ceil.HALFTON, + (getUnitTonnage() > 100), movementMode); // determine the weight of the location; // if it's a "strange" location, then the rest of this is pointless.