Skip to content

Commit

Permalink
removed testing-code
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Sep 25, 2018
1 parent 3f8cf5c commit ef86847
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions ArmaFiles/src/raven/config/CfgFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,45 +173,4 @@ public void init() throws CfgFunctionsException {
public Map<String, ConfigFunction> getDefinedFunctions() {
return new HashMap<>(functionMap);
}

public static void main(String[] args) throws IOException, RapificationException, ConfigException {
File root = new File("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Arma 3");

worker(root);
}

private static void worker(File file) throws IOException, RapificationException, ConfigException {
if (file.isDirectory()) {
for (File current : file.listFiles()) {
worker(current);
}
} else {
if (!file.getName().toLowerCase().endsWith(".pbo")) {
return;
}

PBO pbo = new PBO(file);

PBOEntry functionsEntry = pbo.getEntry("config.bin");

if (functionsEntry == null) {
return;
}

ConfigClass cfg = ConfigClass.fromRapifiedFile(new ByteReader(functionsEntry.toStream()));

ConfigClass functionsClass = cfg.getSubclass("CfgFunctions", false);

if (functionsClass == null) {
return;
}

CfgFunctions cfgFunctions = new CfgFunctions(functionsClass);
cfgFunctions.init();

System.out.println(file.getAbsolutePath());
System.out.println("\t" + cfgFunctions.getDefinedFunctions().size() + " - "
+ cfgFunctions.getDefinedFunctions().keySet());
}
}
}

0 comments on commit ef86847

Please sign in to comment.