Skip to content

Commit

Permalink
Fixes #1: Auto-fill would try to mount infantry weapons on BA
Browse files Browse the repository at this point in the history
  • Loading branch information
arlith committed Jul 31, 2016
1 parent f475c66 commit a2c72a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION HISTORY:
----------------
v0.1.57-git
+ PR #8: Adjust position of printed pilot names for Meks
+ Issue #1: Auto-fill would try to mount infantry weapons on BA

v0.1.56
+ Issue #16: Program Breaking issue with 1.55 Equipment Panel
Expand Down Expand Up @@ -685,6 +686,7 @@ V 0.1.17 Dev (Closed 9-29-2010)
+ Bug: Protomech missile ammo not printing correct amount of shots
+ added new Atremis/Apollo text to Mechs and Tanks weapons loadout
+ Bug: MML allowing armor overage.

+ Bug: Extra turret armor hard coded to 79
+ Bug: Mixed tech armor not working correctly
+ Added Blue Shield Particle Field Damper
Expand Down
7 changes: 7 additions & 0 deletions src/megameklab/com/util/UnitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2963,6 +2963,13 @@ public static void removeTC(Entity unit) {

public static boolean isValidLocation(Entity unit, EquipmentType eq,
int location) {
if (unit instanceof BattleArmor) {
// Infantry weapons can only be mounted in armored gloves/APMs
if (eq.hasFlag(WeaponType.F_INFANTRY)) {
return false;
}
return true;
}
if ((eq instanceof MiscType)) {
if (((eq.hasFlag(MiscType.F_CLUB) || eq
.hasFlag(MiscType.F_HAND_WEAPON)))) {
Expand Down

0 comments on commit a2c72a1

Please sign in to comment.