diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index 236e830c..03c187ee 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -10,6 +10,7 @@ package engine.wpak; import engine.gameManager.ConfigManager; import engine.mbEnums; +import engine.wpak.data.PowerAction; import engine.wpak.data.PowerData; import engine.wpak.data.PowerEntry; import org.pmw.tinylog.Logger; @@ -106,12 +107,27 @@ public class PowersParser { powerEntry.releaseAnim = Integer.parseInt(iterator.next()); powerEntry.targetSelect = mbEnums.TargetSelectType.valueOf(iterator.next()); + // Process key value pairs after header + + while (iterator.hasNext()) { + + String lineValue = iterator.next(); + String[] linevalues = lineValue.split("="); + String key = linevalues[0].trim(); + + switch (key) { + case "ACTION": + PowerAction powerAction = new PowerAction(); + break; + + default: + Logger.error("Unhandled variable type:" + key); + } + - for (int x = 2; x < powerEntries.length; x++) { - // Parse key/pair values - // via switch } + } catch (Exception e) { Logger.error(powerEntry.power_id); }