Browse Source

TrackEntry pojo created.

feature-config-parsing2
MagicBot 4 months ago
parent
commit
2bc872e9d9
  1. 11
      src/engine/wpak/PowerActionParser.java
  2. 4
      src/engine/wpak/data/TrackEntry.java

11
src/engine/wpak/PowerActionParser.java

@ -13,6 +13,7 @@ import engine.mbEnums;
import engine.wpak.data.EffectDescription; import engine.wpak.data.EffectDescription;
import engine.wpak.data.PowerActionEntry; import engine.wpak.data.PowerActionEntry;
import engine.wpak.data.StatTransfer; import engine.wpak.data.StatTransfer;
import engine.wpak.data.TrackEntry;
import org.pmw.tinylog.Logger; import org.pmw.tinylog.Logger;
import java.io.IOException; import java.io.IOException;
@ -59,6 +60,7 @@ public class PowerActionParser {
PowerActionEntry powerActionEntry = new PowerActionEntry(); PowerActionEntry powerActionEntry = new PowerActionEntry();
EffectDescription effectDescription; EffectDescription effectDescription;
StatTransfer statTransfer; StatTransfer statTransfer;
TrackEntry trackEntry;
try { try {
// Remove all lines that contain a # and leading/trailing blank lines // Remove all lines that contain a # and leading/trailing blank lines
@ -158,6 +160,15 @@ public class PowerActionParser {
case "SetItemFlag": case "SetItemFlag":
powerActionEntry.itemFlag = mbEnums.ItemFlags.valueOf(headerIterator.next()); powerActionEntry.itemFlag = mbEnums.ItemFlags.valueOf(headerIterator.next());
break; break;
case "Track":
trackEntry = new TrackEntry();
trackEntry.action_id = headerIterator.next();
trackEntry.unknown1 = Boolean.parseBoolean(headerIterator.next());
trackEntry.unknown2 = Boolean.parseBoolean(headerIterator.next());
trackEntry.type = headerIterator.next();
trackEntry.min = Integer.parseInt(headerIterator.next());
trackEntry.max = Integer.parseInt(headerIterator.next());
break;
case "Recall": // No arguments for these tags or not parsed case "Recall": // No arguments for these tags or not parsed
case "Teleport": case "Teleport":
case "TreeChoke": case "TreeChoke":

4
src/engine/wpak/data/TrackEntry.java

@ -11,8 +11,8 @@ package engine.wpak.data;
public class TrackEntry { public class TrackEntry {
public String action_id; public String action_id;
public int unknown1; public Boolean unknown1;
public int unknown2; public Boolean unknown2;
public String type; public String type;
public int min; public int min;
public int max; public int max;

Loading…
Cancel
Save