diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index 2420a50b..bb58d73b 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -141,28 +141,28 @@ public class PowersParser { String lineValue = iterator.next(); String[] lineValues = lineValue.split("="); String key = lineValues[0].trim(); - PowerAction powerAction; + ActionEntry actionEntry; String[] arguments; Matcher matcher1; ArrayList args; switch (key) { case "ACTION": - powerAction = new PowerAction(); + actionEntry = new ActionEntry(); arguments = lineValues[1].trim().split("\\s+"); if (powerEntry.power_id.equals("HNT-050")) Logger.error("debug"); - powerAction.effect_id = arguments[0]; - powerAction.minTrains = Integer.parseInt(arguments[1]); - powerAction.maxTrains = Integer.parseInt(arguments[2]); - powerAction.duration = Float.parseFloat(arguments[3]); - powerAction.curve = mbEnums.CompoundCurveType.valueOf(arguments[4]); - powerAction.stackingCategory = arguments[5]; - powerAction.stackingPriority = Integer.parseInt(arguments[6]); - powerAction.categoryToPower = mbEnums.CategoryToPowerType.valueOf(arguments[7]); - powerEntry.actions.add(powerAction); + actionEntry.effect_id = arguments[0]; + actionEntry.minTrains = Integer.parseInt(arguments[1]); + actionEntry.maxTrains = Integer.parseInt(arguments[2]); + actionEntry.duration = Float.parseFloat(arguments[3]); + actionEntry.curve = mbEnums.CompoundCurveType.valueOf(arguments[4]); + actionEntry.stackingCategory = arguments[5]; + actionEntry.stackingPriority = Integer.parseInt(arguments[6]); + actionEntry.categoryToPower = mbEnums.CategoryToPowerType.valueOf(arguments[7]); + powerEntry.actionEntries.add(actionEntry); break; case "MaxLevel": powerEntry.maxLevel = Integer.parseInt(lineValues[1].trim()); diff --git a/src/engine/wpak/data/PowerAction.java b/src/engine/wpak/data/ActionEntry.java similarity index 97% rename from src/engine/wpak/data/PowerAction.java rename to src/engine/wpak/data/ActionEntry.java index 28ef5187..98c8cce7 100644 --- a/src/engine/wpak/data/PowerAction.java +++ b/src/engine/wpak/data/ActionEntry.java @@ -10,7 +10,7 @@ package engine.wpak.data; import engine.mbEnums; -public class PowerAction { +public class ActionEntry { public String effect_id; public int minTrains; diff --git a/src/engine/wpak/data/PowerEntry.java b/src/engine/wpak/data/PowerEntry.java index 190f947c..915bc8ac 100644 --- a/src/engine/wpak/data/PowerEntry.java +++ b/src/engine/wpak/data/PowerEntry.java @@ -38,7 +38,7 @@ public class PowerEntry { // Additional key/value type power entries - public ArrayList actions = new ArrayList<>(); + public ArrayList actionEntries = new ArrayList<>(); public int maxLevel; public int hateValue; public mbEnums.CompoundCurveType hateCurve = mbEnums.CompoundCurveType.DefaultFlat;