-
Notifications
You must be signed in to change notification settings - Fork 293
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
Armor rework, part 1b #5116
Armor rework, part 1b #5116
Conversation
…gamek into SJuliez-additional-name-field
@@ -47,11 +47,11 @@ | |||
if (aero.hasPatchworkArmor()) { | |||
int armorcost = 0; | |||
for (int loc = 0; loc < aero.locations(); loc++) { | |||
armorcost += aero.getArmorWeight(loc) * EquipmentType.getArmorCost(aero.getArmorType(loc)); | |||
armorcost += aero.getArmorWeight(loc) * ArmorType.forEntity(aero, loc).getCost(); |
Check failure
Code scanning / CodeQL
Implicit narrowing conversion in compound assignment High
@@ -57,11 +57,11 @@ | |||
if (fighter.hasPatchworkArmor()) { | |||
int armorcost = 0; | |||
for (int loc = 0; loc < fighter.locations(); loc++) { | |||
armorcost += fighter.getArmorWeight(loc) * EquipmentType.getArmorCost(fighter.getArmorType(loc)); | |||
armorcost += fighter.getArmorWeight(loc) * ArmorType.forEntity(fighter, loc).getCost(); |
Check failure
Code scanning / CodeQL
Implicit narrowing conversion in compound assignment High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question, more likely for my own education than anything else.
@@ -293,7 +307,7 @@ private static ArmorType createClanFerroFibrous() { | |||
armor.setInternalName("Clan Ferro-Fibrous"); | |||
armor.addLookupName("Clan Ferro-Fibrous Armor"); | |||
armor.addLookupName("Clan Ferro Fibre"); | |||
armor.tonnage = TONNAGE_VARIABLE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're removing setting the tonnage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used. Armor tonnage is determined by the number of points of armor on the unit and calculated by points per ton or weight per point depending on unit type.
Continuation of #5101.
Removes armor names array from EquipmentType.
Moves armor cost calculations from EquipmentType to ArmorType.
Splits protomech armor from standard armor due to differences in cost.