Skip to content

Commit

Permalink
Merge pull request #6531 from SJuliez/legacy-inf-load
Browse files Browse the repository at this point in the history
MML #1721: legacy infantry blk files
  • Loading branch information
HammerGS authored Feb 11, 2025
2 parents a4aff92 + 8b4337b commit 632b0fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion megamek/src/megamek/common/loaders/BLKInfantryFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public Entity getEntity() throws EntityLoadingException {
}

// get primary and secondary weapons
if (dataFile.exists("secondn")) {
// the check for "secondary" is for legacy infantry files that have a <secondn> block but no actual secondary weapon
if (dataFile.exists("secondn") && dataFile.exists("Secondary")) {
infantry.setSecondaryWeaponsPerSquad(dataFile.getDataAsInt("secondn")[0]);
}

Expand Down

0 comments on commit 632b0fd

Please sign in to comment.