Skip to content

Commit

Permalink
Merge pull request #5012 from SJuliez/quirk-entry-slot-fix
Browse files Browse the repository at this point in the history
QuirkEntry: remove maximum slot number check
  • Loading branch information
HammerGS authored Jan 9, 2024
2 parents 5378469 + 7b69037 commit 2387931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megamek/src/megamek/common/QuirkEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public QuirkEntry(String code, String location, int slot, String weaponName, Str
throw new IllegalArgumentException("No location for " + code + " : " + unitId);
} else if (StringUtility.isNullOrBlank(weaponName)) {
throw new IllegalArgumentException("No weapon for " + code + " : " + unitId);
} else if ((slot < 0) || (slot > 11)) {
} else if (slot < 0) {
throw new IllegalArgumentException("Invalid slot index (" + slot + ") for " + code + " : " + unitId);
}

Expand All @@ -115,7 +115,7 @@ public QuirkEntry(String code, String location, int slot, String weaponName) {
throw new IllegalArgumentException("Invalid location!");
} else if (StringUtility.isNullOrBlank(weaponName)) {
throw new IllegalArgumentException("Invalid weapon name!");
} else if ((slot < 0) || (slot > 11)) {
} else if (slot < 0) {
throw new IllegalArgumentException("Invalid slot index!");
}

Expand Down

0 comments on commit 2387931

Please sign in to comment.