Skip to content

Commit

Permalink
Merge pull request #1404 from MegaMek/weapon_module_heat
Browse files Browse the repository at this point in the history
Include equipment that modifies weapon heat in status bar
  • Loading branch information
neoancient authored Jan 31, 2024
2 parents 2785e0d + 3625d4b commit 8e141cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions megameklab/src/megameklab/ui/generalUnit/StatusBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@ protected long estimatedHeatGeneration() {

for (Mounted m : getEntity().getMisc()) {
heat += m.getType().getHeat();

if (m.getType().hasFlag(MiscType.F_LASER_INSULATOR)) {
heat--;
} else if (m.getType().hasFlag(MiscType.F_PPC_CAPACITOR)) {
heat += 5;
} else if (m.getType().hasFlag(MiscType.F_RISC_LASER_PULSE_MODULE)) {
heat += 2;
}
}
return Math.round(heat);
}
Expand Down

0 comments on commit 8e141cd

Please sign in to comment.