Browse Source

Needs group 0

feature-config-parsing2
MagicBot 4 months ago
parent
commit
afb6d3e8a3
  1. 4
      src/engine/wpak/EffectsParser.java
  2. 4
      src/engine/wpak/PowersParser.java

4
src/engine/wpak/EffectsParser.java

@ -73,7 +73,7 @@ public class EffectsParser { @@ -73,7 +73,7 @@ public class EffectsParser {
Matcher matcher = STRSPLIT_REGEX.matcher(firstLine);
while (matcher.find())
effectHeader.add(matcher.group(1).trim());
effectHeader.add(matcher.group().trim());
effectEntry.id = effectHeader.get(0);
effectEntry.name = effectHeader.get(1);
@ -135,7 +135,7 @@ public class EffectsParser { @@ -135,7 +135,7 @@ public class EffectsParser {
Matcher matcher = STRSPLIT_REGEX.matcher(modEntry.trim());
while (matcher.find())
modValues.add(matcher.group(1).trim());
modValues.add(matcher.group().trim());
effectModifier.type = mbEnums.ModType.valueOf(modValues.get(0).trim());

4
src/engine/wpak/PowersParser.java

@ -36,7 +36,7 @@ public class PowersParser { @@ -36,7 +36,7 @@ public class PowersParser {
while (matcher.find()) {
PowerEntry powerEntry = parsePowerEntry(matcher.group(1).trim());
PowerEntry powerEntry = parsePowerEntry(matcher.group().trim());
}
}
@ -55,7 +55,7 @@ public class PowersParser { @@ -55,7 +55,7 @@ public class PowersParser {
Matcher matcher = STRSPLIT_REGEX.matcher(headerString);
while (matcher.find())
powerHeader.add(matcher.group(1).trim());
powerHeader.add(matcher.group().trim());
for (int x = 2; x < powerEntries.length; x++) {
// Parse key/pair values

Loading…
Cancel
Save