Browse Source

More enum work.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
23bf491d4b
  1. 7
      src/engine/mbEnums.java
  2. 2
      src/engine/wpak/PowerEntry.java
  3. 2
      src/engine/wpak/PowersParser.java

7
src/engine/mbEnums.java

@ -3035,5 +3035,12 @@ public class mbEnums { @@ -3035,5 +3035,12 @@ public class mbEnums {
MANA,
STAMINA;
}
public enum AreaType {
NONE,
POINTBLANK,
SPHERE,
CONE;
}
}

2
src/engine/wpak/PowerEntry.java

@ -18,7 +18,7 @@ public class PowerEntry { @@ -18,7 +18,7 @@ public class PowerEntry {
public ArrayList<PowerData> powers = new ArrayList<>();
public mbEnums.PowerTargetType target_type;
public int range;
public String areaType;
public mbEnums.AreaType areaType;
public int areaRange;
public String excludeType;
public mbEnums.CostType costType;

2
src/engine/wpak/PowersParser.java

@ -88,7 +88,7 @@ public class PowersParser { @@ -88,7 +88,7 @@ public class PowersParser {
powerEntry.target_type = mbEnums.PowerTargetType.valueOf(nextValue);
powerEntry.range = Integer.parseInt(iterator.next());
powerEntry.areaType = iterator.next();
powerEntry.areaType = mbEnums.AreaType.valueOf(iterator.next());
powerEntry.areaRange = Integer.parseInt(iterator.next());
powerEntry.excludeType = iterator.next();
powerEntry.costType = mbEnums.CostType.valueOf(iterator.next());

Loading…
Cancel
Save