Skip to content

Commit

Permalink
Merge pull request #2301 from sixlettervariables/issue-2296-dropship-…
Browse files Browse the repository at this point in the history
…ammobins-empty-size

Issues #2296 #2299: Support older campaign dropship and jumpship ammo bin sizes in XML file
  • Loading branch information
sixlettervariables authored Dec 20, 2020
2 parents e9ff114 + a194aa9 commit 5bbea87
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ protected void loadFieldsFromXmlNode(Node wn) {

for (int x=0; x<nl.getLength(); x++) {
Node wn2 = nl.item(x);
if (wn2.getNodeName().equalsIgnoreCase("bayEqNum")) {
// CAW: campaigns prior to 0.47.15 stored `size` in `capacity`
if (wn2.getNodeName().equalsIgnoreCase("capacity")) {
size = Double.parseDouble(wn2.getTextContent().trim());
} else if (wn2.getNodeName().equalsIgnoreCase("bayEqNum")) {
bayEqNum = Integer.parseInt(wn2.getTextContent());
}
}
Expand Down

0 comments on commit 5bbea87

Please sign in to comment.