Browse Source

PowerActionEntry parsing work.

feature-config-parsing2
MagicBot 4 months ago
parent
commit
7ed94d171a
  1. 1
      src/engine/wpak/EffectsParser.java
  2. 7
      src/engine/wpak/PowersParser.java
  3. 3
      src/engine/wpak/data/PowerActionEntry.java

1
src/engine/wpak/EffectsParser.java

@ -43,6 +43,7 @@ public class EffectsParser {
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
String fileContents = new String(fileData); String fileContents = new String(fileData);
// Iterate over effect entries from .wpak data // Iterate over effect entries from .wpak data

7
src/engine/wpak/PowersParser.java

@ -57,7 +57,6 @@ public class PowersParser {
PowerEntry powerEntry = new PowerEntry(); PowerEntry powerEntry = new PowerEntry();
try {
StringBuilder conditionString = new StringBuilder(); StringBuilder conditionString = new StringBuilder();
StringBuilder powerString = new StringBuilder(); StringBuilder powerString = new StringBuilder();
@ -296,7 +295,7 @@ public class PowersParser {
// Parse power conditions // Parse power conditions
if (conditionString.toString().isEmpty() == false) { if (!conditionString.toString().isEmpty()) {
String[] conditions = conditionString.toString().split("\n"); String[] conditions = conditionString.toString().split("\n");
for (String condition : conditions) { for (String condition : conditions) {
@ -305,10 +304,6 @@ public class PowersParser {
} }
} }
} catch (Exception e) {
Logger.error(powerEntry.power_id + " " + e);
}
return powerEntry; return powerEntry;
} }

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

@ -34,7 +34,4 @@ public class PowerActionEntry {
public boolean applyEffectBlank = false; public boolean applyEffectBlank = false;
public boolean wearOffEffectBlank = false; public boolean wearOffEffectBlank = false;
} }

Loading…
Cancel
Save