MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / extractDifficulty

Function extractDifficulty

tools/extractors/main.cpp:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 "Path to the extractor output directory", "./data");
26
27static void extractDifficulty(const InitialGameStateExtractor &e, UString outputPath,
28 InitialGameStateExtractor::Difficulty difficulty, UString patchPath)
29{
30 GameState s;
31 e.extract(s, difficulty);
32 // Alexey Andronov: This is problematic, as it duplicates stuff, so why were we doing it again!?
33 // s.loadGame("data/common_patch");
34 if (!patchPath.empty())
35 {
36 s.loadGame(patchPath);
37 }
38 s.saveGame(outputPath, true);
39}
40
41std::map<UString, std::function<void(const InitialGameStateExtractor &e)>> thingsToExtract = {
42 {"difficulty0",

Callers 1

main.cppFile · 0.85

Calls 4

extractMethod · 0.80
emptyMethod · 0.80
loadGameMethod · 0.45
saveGameMethod · 0.45

Tested by

no test coverage detected