Skip to content

Commit

Permalink
partial tripod accommodation
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAragua committed Oct 4, 2023
1 parent 01a1b98 commit 92419cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions MekHQ/src/mekhq/campaign/parts/MekLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 92419cc

Please sign in to comment.