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

Armor rework, part 1a #1402

Merged
merged 4 commits into from
Feb 1, 2024
Merged

Armor rework, part 1a #1402

merged 4 commits into from
Feb 1, 2024

Conversation

neoancient
Copy link
Member

MML part of MegaMek/megamek#5101

Comment on lines -956 to -972
/**
* NOTE: only use for non-patchwork armor
*
* @param unit The entity
* @param armorTons
* @return
*/
public static int getArmorPoints(Entity unit, int loc, double armorTons) {
double armorPerTon = 16.0 * EquipmentType.getArmorPointMultiplier(
unit.getArmorType(loc), unit.getArmorTechLevel(loc));
if (unit.getArmorType(loc) == EquipmentType.T_ARMOR_HARDENED) {
armorPerTon = 8.0;
}
return Math.min((int) Math.floor(armorPerTon * armorTons),
UnitUtil.getMaximumArmorPoints(unit, loc));
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this method because it is unused.

@SJuliez SJuliez merged commit 0c417f0 into master Feb 1, 2024
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants