Skip to content

Commit

Permalink
Fix parser bug when loading tripod AES
Browse files Browse the repository at this point in the history
The file parser for loading 'Mech designs previously failed to load
tripods with AES, as it didn't expect that to be located in the center
leg. This has been fixed by adding that location to the list of checks.

I initially assumed that this would impact quadrupeds as well. Since
they don't seem to have their own leg locations, I'm guessing they reuse
the arm locations.
  • Loading branch information
Saklad5 committed Sep 12, 2023
1 parent d773452 commit 3898749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion megamek/src/megamek/common/MechFileParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ else if (m.getType().hasFlag(MiscType.F_APOLLO)
if ((m.getLocation() != Mech.LOC_LARM)
&& (m.getLocation() != Mech.LOC_LLEG)
&& (m.getLocation() != Mech.LOC_RARM)
&& (m.getLocation() != Mech.LOC_RLEG)) {
&& (m.getLocation() != Mech.LOC_RLEG)
&& (m.getLocation() != Mech.LOC_CLEG)) {
throw new EntityLoadingException(
"Unable to load AES due to incompatible location for "+ent.getShortName());
}
Expand Down

0 comments on commit 3898749

Please sign in to comment.