Skip to content

Commit

Permalink
SuperHeavy Meks cannot mount jump jets.
Browse files Browse the repository at this point in the history
#50: Super heavies shouldn't be allowed to use certain equipment.
  • Loading branch information
neoancient committed Feb 18, 2017
1 parent 7740795 commit f54062f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/megameklab/com/ui/Mek/tabs/StructureTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,9 @@ public void refreshJumpMP() {
// we are allowed
jumpMPBase.setValue(getMech().getOriginalJumpMP(true));
jumpMPFinal.setText(String.valueOf(getMech().getJumpMP()));
if ((getJumpJetType() == Mech.JUMP_IMPROVED)
if (getMech().isSuperHeavy()) {
jumpModel.setMaximum(0);
} else if ((getJumpJetType() == Mech.JUMP_IMPROVED)
|| (getJumpJetType() == Mech.JUMP_PROTOTYPE_IMPROVED)) {
jumpModel.setMaximum((int)Math.ceil(getMech().getOriginalWalkMP() * 1.5));
} else if (getJumpJetType() == Mech.JUMP_BOOSTER) {
Expand Down Expand Up @@ -2192,6 +2194,9 @@ public void stateChanged(ChangeEvent e) {
}
getMech().setWeight((Integer) weightClass.getValue());
getMech().autoSetInternal();
if (getMech().isSuperHeavy()) {
getMech().setOriginalJumpMP(0);
}
populateChoices(true);
if (changedSuperHeavyStatus) {
// Interal structure crits may change
Expand Down

0 comments on commit f54062f

Please sign in to comment.