Browse Source

More powerAction work.

feature-config-parsing2
MagicBot 4 months ago
parent
commit
362958c0f1
  1. 8
      src/engine/wpak/PowersParser.java

8
src/engine/wpak/PowersParser.java

@ -19,6 +19,7 @@ import java.io.IOException; @@ -19,6 +19,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -52,12 +53,12 @@ public class PowersParser { @@ -52,12 +53,12 @@ public class PowersParser {
try {
String[] powerEntries = powerData.trim().split("\n");
String[] lineData = powerData.trim().split("\n");
ArrayList<String> powerHeader = new ArrayList<>();
// Parse header
String headerString = powerEntries[0];
String headerString = lineData[0];
headerString = headerString.replace("\n", " ");
Matcher matcher = STRSPLIT_REGEX.matcher(headerString);
@ -109,6 +110,9 @@ public class PowersParser { @@ -109,6 +110,9 @@ public class PowersParser {
// Process key value pairs after header
iterator = Arrays.stream(lineData).iterator();
iterator.next(); // Ignore header
while (iterator.hasNext()) {
String lineValue = iterator.next();

Loading…
Cancel
Save