MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / load

Method load

src/Ruleset/Ruleset.cpp:200–207  ·  view source on GitHub ↗

* Loads a ruleset's contents from the given source. * @param source The source to use. */

Source from the content-addressed store, hash-verified

198 * @param source The source to use.
199 */
200void Ruleset::load(const std::string &source)
201{
202 std::string dirname = CrossPlatform::getDataFolder("Ruleset/" + source + '/');
203 if (!CrossPlatform::folderExists(dirname))
204 loadFile(CrossPlatform::getDataFile("Ruleset/" + source + ".rul"));
205 else
206 loadFiles(dirname);
207}
208
209/**
210 * Loads a ruleset's contents from a YAML file.

Callers 3

RulesetMethod · 0.45
loadFileMethod · 0.45
newSaveMethod · 0.45

Calls 3

folderExistsFunction · 0.85
getDataFileFunction · 0.85
getDataFolderFunction · 0.50

Tested by

no test coverage detected