33 if (
auto ai_vars =
ai.get_deprecated_child(
"vars",
"unit][ai",
DEP_LEVEL::FOR_REMOVAL,
"FormulaAI will be removed in 1.17"))
35 formula_vars_ = std::make_shared<wfl::map_formula_callable>();
38 for(
const auto& [key, value] : ai_vars->attribute_range()) {
65 config &ai_vars =
ai.add_child(
"vars");
70 str =
i->second.serialize_to_string();
73 ai_vars[
i->first] = str;
A config object defines a single node in a WML file, with access to child nodes.
config & add_child(config_key_type key)
void serialize_from_string(const std::string &str)
Definitions for the interface to Wesnoth Markup Language (WML).
A small explanation about what's going on here: Each action has access to two game_info objects First...
std::shared_ptr< map_formula_callable > map_formula_callable_ptr