Browse Source

More PowerEntry parsing work.

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

6
src/engine/wpak/PowersParser.java

@ -255,6 +255,12 @@ public class PowersParser { @@ -255,6 +255,12 @@ public class PowersParser {
powerEntry.pulseCycle = Integer.parseInt(arguments[0]);
powerEntry.pulseDuration = Integer.parseInt(arguments[1]);
break;
case "MAXNUMMOBTARGETS":
powerEntry.maxMobTargets = Integer.parseInt(lineValues[1].trim());
break;
case "MAXNUMPLAYERTARGETS":
powerEntry.maxPlayerTargets = Integer.parseInt(lineValues[1].trim());
break;
default:
Logger.error("Unhandled variable type:" + key + " for power: " + powerEntry.power_id);
}

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

@ -56,5 +56,8 @@ public class PowerEntry { @@ -56,5 +56,8 @@ public class PowerEntry {
public boolean sticky = false;
public int pulseCycle;
public int pulseDuration;
public int maxMobTargets;
public int maxPlayerTargets;
}

Loading…
Cancel
Save