new WML key for [variable], boolean_equals=, to test boolean equality

This commit is contained in:
Patrick Parker 2007-03-06 00:58:04 +00:00
parent aade40e2c1
commit 19071a90a9
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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");