Skip to content

Commit

Permalink
Show correct number of critical slots for compact engine in Mech summary
Browse files Browse the repository at this point in the history
view.
  • Loading branch information
neoancient authored and Dylan-M committed Feb 13, 2017
1 parent 5c5329e commit 334aee4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/megameklab/com/ui/Mek/views/SummaryView.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import javax.swing.JTextField;
import javax.swing.SwingConstants;

import megamek.common.Engine;
import megamek.common.EquipmentType;
import megamek.common.Mech;
import megamek.common.MiscType;
Expand Down Expand Up @@ -369,6 +370,9 @@ private int getGyroCrits() {
}

private int getEngineCrits() {
if (getMech().getEngine().getEngineType() == Engine.COMPACT_ENGINE) {
return 3;
}
return 6 + (2 * getMech().getEngine().getSideTorsoCriticalSlots().length);
}

Expand Down

0 comments on commit 334aee4

Please sign in to comment.