Browse Source

Debug code added

feature-config-parsing2
MagicBot 3 months ago
parent
commit
a81f90238b
  1. 10
      src/engine/wpak/PowersParser.java

10
src/engine/wpak/PowersParser.java

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
package engine.wpak;
import engine.gameManager.ConfigManager;
import org.pmw.tinylog.Logger;
import java.io.IOException;
import java.nio.file.Files;
@ -43,7 +44,11 @@ public class PowersParser { @@ -43,7 +44,11 @@ public class PowersParser {
private static PowerEntry parsePowerEntry(String powerData) {
PowerEntry powerEntry = new PowerEntry();
try {
String[] powerEntries = powerData.trim().split("\n");
ArrayList<String> powerHeader = new ArrayList<>();
@ -80,11 +85,16 @@ public class PowersParser { @@ -80,11 +85,16 @@ public class PowersParser {
powerEntry.unknown05 = Integer.parseInt(powerHeader.get(20));
powerEntry.targetRequirement = powerHeader.get(21);
for (int x = 2; x < powerEntries.length; x++) {
// Parse key/pair values
// via switch
}
} catch (Exception e) {
Logger.error(powerEntry.power_id);
}
return powerEntry;
}

Loading…
Cancel
Save