Skip to content

Commit

Permalink
Added Compatibility Handler for VeeStabiliser Parts
Browse files Browse the repository at this point in the history
Corrected the className string comparison and assignment for `VeeStabiliser` to `VeeStabilizer`.
  • Loading branch information
IllianiCBT committed Sep 26, 2024
1 parent 6e2a350 commit b8b9400
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MekHQ/src/mekhq/campaign/parts/Part.java
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public static Part generateInstanceFromXML(Node wn, Version version) {
Node classNameNode = attrs.getNamedItem("type");
String className = classNameNode.getTextContent();

// reverse compatibility checks
// <50.01 compatibility handlers
if (className.equalsIgnoreCase("mekhq.campaign.parts.MekEngine")) {
className = "mekhq.campaign.parts.EnginePart";
} else if (className.equalsIgnoreCase("mekhq.campaign.parts.MissingMekEngine")) {
Expand All @@ -686,6 +686,8 @@ public static Part generateInstanceFromXML(Node wn, Version version) {
className = "mekhq.campaign.parts.equipment.HeatSink";
} else if (className.equalsIgnoreCase("mekhq.campaign.parts.MissingHeatSink")) {
className = "mekhq.campaign.parts.equipment.MissingHeatSink";
} else if (className.equalsIgnoreCase("mekhq.campaign.parts.VeeStabiliser")) {
className = "mekhq.campaign.parts.VeeStabilizer";
}

Part retVal = null;
Expand Down

0 comments on commit b8b9400

Please sign in to comment.