32 for(
const auto& [key, node] :
cfg.all_ordered()) {
43 if(node.has_child(
"then")) {
51 bool elseif_flag =
false;
54 for(
const auto& elseif : elseif_children) {
56 if(elseif.has_child(
"then")) {
66 if(node.has_child(
"else") && !elseif_flag) {
72 else if(key ==
"switch") {
73 const std::string var_name = node[
"variable"];
75 bool case_not_found =
true;
77 for(
const auto& [switch_key, switch_node] : node.all_ordered()) {
78 if(switch_key !=
"case") {
83 const std::string var_expected_value = switch_node[
"value"];
84 if(var_actual_value == var_expected_value) {
85 case_not_found =
false;
91 for(
const auto& [else_key, else_node] : node.all_ordered()) {
92 if(else_key !=
"else") {
102 else if(key ==
"deprecated_message") {
108 else if(key ==
"wml_message") {
112 node[
"logger"], node[
"message"], node[
"in_chat"].to_bool(
false));
void put_wml_message(const std::string &logger, const std::string &message, bool in_chat)
Helper function which determines whether a wml_message text can really be pushed into the wml_message...
virtual void resolve_wml(const vconfig &cfg)
Takes care of initializing and branching properties.
virtual bool resolve_wml_helper(const std::string &key, const vconfig &node)=0
May be implemented by derived classes to perform additional actions When executing resolve_wml.