Skip to content

Commit 6379bf1

Browse files
Fix: MML #2255 SC and JS Maximum Armor Points (#8689)
Fix MegaMek/megameklab#2255 Fix incorrect getPointsPerTon call in TestSmallCraft and TestAdvancedAerospace maxArmorPoints function, which was returning the fixed points per ton for BattleArmor instead of the correct variant points per ton for entities Note for Reviewer: MERGE BEFORE MegaMek/megameklab#2292
2 parents 6d20a0b + f87ed1f commit 6379bf1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

megamek/src/megamek/common/verifier/TestAdvancedAerospace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static List<ArmorType> legalArmorsFor(ITechManager techManager, boolean p
100100
* @return The total number of armor points allowed to the vessel
101101
*/
102102
public static int maxArmorPoints(Jumpship vessel) {
103-
double pointsPerTon = ArmorType.forEntity(vessel).getPointsPerTon();
103+
double pointsPerTon = ArmorType.forEntity(vessel).getPointsPerTon(vessel);
104104
int baseArmor = (int) (pointsPerTon * maxArmorWeight(vessel) + getSIBonusArmorPoints(vessel));
105105
if (vessel.isPrimitive()) {
106106
return (int) (baseArmor * 0.66);

megamek/src/megamek/common/verifier/TestSmallCraft.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static List<ArmorType> legalArmorsFor(ITechManager techManager) {
105105
* @return The total number of armor points allowed to the vessel
106106
*/
107107
public static int maxArmorPoints(SmallCraft vessel) {
108-
double pointsPerTon = ArmorType.forEntity(vessel).getPointsPerTon();
108+
double pointsPerTon = ArmorType.forEntity(vessel).getPointsPerTon(vessel);
109109
int baseArmor = (int) (pointsPerTon * maxArmorWeight(vessel) + getSIBonusArmorPoints(vessel));
110110
if (vessel.isPrimitive()) {
111111
return (int) (baseArmor * 0.66);

0 commit comments

Comments
 (0)