Browse Source

More PowerEntry parsing work.

feature-config-parsing2
MagicBot 4 months ago
parent
commit
4f25e7e24f
  1. 5
      src/engine/wpak/PowersParser.java
  2. 3
      src/engine/wpak/data/PowerEntry.java

5
src/engine/wpak/PowersParser.java

@ -250,6 +250,11 @@ public class PowersParser { @@ -250,6 +250,11 @@ public class PowersParser {
case "STICKY":
powerEntry.sticky = Boolean.parseBoolean(lineValues[1].trim());
break;
case "PULSEINFO":
arguments = lineValues[1].trim().split("\\s+");
powerEntry.pulseCycle = Integer.parseInt(arguments[0]);
powerEntry.pulseDuration = Integer.parseInt(arguments[1]);
break;
default:
Logger.error("Unhandled variable type:" + key + " for power: " + powerEntry.power_id);
}

3
src/engine/wpak/data/PowerEntry.java

@ -54,4 +54,7 @@ public class PowerEntry { @@ -54,4 +54,7 @@ public class PowerEntry {
public EnumSet<mbEnums.MonsterType> monsterPrereqs = EnumSet.noneOf(mbEnums.MonsterType.class);
public boolean shouldCheckPath = false;
public boolean sticky = false;
public int pulseCycle;
public int pulseDuration;
}

Loading…
Cancel
Save