Browse Source

More PowerEntry parsing work.

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

5
src/engine/wpak/PowersParser.java

@ -239,6 +239,11 @@ public class PowersParser { @@ -239,6 +239,11 @@ public class PowersParser {
for (String restriction : arguments)
powerEntry.monsterRestricts.add(mbEnums.MonsterType.valueOf(restriction.trim()));
break;
case "MONSTERTYPEPREREQS":
arguments = lineValues[1].trim().split("\\s+");
for (String restriction : arguments)
powerEntry.monsterPrereqs.add(mbEnums.MonsterType.valueOf(restriction.trim()));
break;
case "SHOULDCHECKPATH":
powerEntry.shouldCheckPath = Boolean.parseBoolean(lineValues[1].trim());
break;

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

@ -51,5 +51,6 @@ public class PowerEntry { @@ -51,5 +51,6 @@ public class PowerEntry {
public boolean bladeTrails = false;
public EquipmentPreReq equipmentPreReq;
public EnumSet<mbEnums.MonsterType> monsterRestricts = EnumSet.noneOf(mbEnums.MonsterType.class);
public EnumSet<mbEnums.MonsterType> monsterPrereqs = EnumSet.noneOf(mbEnums.MonsterType.class);
public boolean shouldCheckPath = false;
}

Loading…
Cancel
Save