new WML key for [variable], boolean_equals=, to test boolean equality
This commit is contained in:
parent
aade40e2c1
commit
19071a90a9
2 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,7 @@ Version 1.3.1+svn:
|
|||
* use complex variable substitution almost everywhere
|
||||
* new key for [set_variable], literal=, to avoid variable substitution
|
||||
* [effect] can now toggle the zoc
|
||||
* new key for [variable], boolean_equals=, to test boolean equality
|
||||
* user interface:
|
||||
* new sounds for user interface events
|
||||
* misceleanous bug fixes
|
||||
|
|
|
@ -221,6 +221,11 @@ bool conditional_passed(const unit_map* units,
|
|||
if(values.get_attribute("less_than_equal_to") != "" && atof(less_than_equal_to.c_str()) < num_value) {
|
||||
return false;
|
||||
}
|
||||
const std::string& boolean_equals = values["boolean_equals"];
|
||||
if(values.get_attribute("boolean_equals") != ""
|
||||
&& (utils::string_bool(value) != utils::string_bool(boolean_equals))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const vconfig::child_list& not_statements = cond.get_children("not");
|
||||
|
|
Loading…
Add table
Reference in a new issue