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

Method load

src/Ruleset/ArticleDefinition.cpp:81–93  ·  view source on GitHub ↗

* Loads the article definition from a YAML file. * @param node YAML node. * @param listOrder The list weight for this article. */

Source from the content-addressed store, hash-verified

79 * @param listOrder The list weight for this article.
80 */
81 void ArticleDefinition::load(const YAML::Node &node, int listOrder)
82 {
83 id = title = node["id"].as<std::string>(id);
84 section = node["section"].as<std::string>(section);
85 requires = node["requires"].as< std::vector<std::string> >(requires);
86 title = node["title"].as<std::string>(title);
87 //_type_id = (UfopaediaTypeId)node["type_id"].as<int>(_type_id);
88 _listOrder = node["listOrder"].as<int>(_listOrder);
89 if (!_listOrder)
90 {
91 _listOrder = listOrder;
92 }
93 }
94
95 /**
96 * Gets the list weight of the article.

Callers

nothing calls this directly

Calls 1

loadFunction · 0.85

Tested by

no test coverage detected