Skip to content

Commit

Permalink
Disallow armored components for superheavy Meks.
Browse files Browse the repository at this point in the history
+Fix #50: Super heavies shouldn't be allowed to use certain equipment.
  • Loading branch information
neoancient committed Feb 18, 2017
1 parent 2d3f400 commit 6741a57
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/history.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
VERSION HISTORY:
----------------
v0.42.2-git
+ Issue #50: Super heavies shouldn't be allowed to use certain equipment.

v0.42.1 (2017-02-13 03:30 UTC)
+ Printing for conventional infantry record sheets.
+ New infantry motive types: VTOL and SCUBA.
Expand Down
2 changes: 1 addition & 1 deletion src/megameklab/com/util/Mech/DropTargetCriticalList.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public void actionPerformed(ActionEvent e) {
});
popup.add(info);

} else {
} else if (!(getUnit() instanceof Mech && ((Mech)getUnit()).isSuperHeavy())) {
JMenuItem info = new JMenuItem("Add Armoring");
info.setActionCommand(Integer.toString(location));
info.addActionListener(new ActionListener() {
Expand Down
1 change: 0 additions & 1 deletion src/megameklab/com/util/UnitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2390,7 +2390,6 @@ public static boolean isMechEquipment(EquipmentType eq, Mech unit) {
|| eq.hasFlag(MiscType.F_MASC) // to catch Supercharger
|| eq.hasFlag(MiscType.F_MODULAR_ARMOR)
|| eq.hasFlag(MiscType.F_PARTIAL_WING)
|| eq.hasFlag(MiscType.F_SCM)
|| eq.hasFlag(MiscType.F_UMU))) {
return false;
}
Expand Down

0 comments on commit 6741a57

Please sign in to comment.