Accept [and] and [or] in [filter_wml]
This commit is contained in:
parent
79b7e08573
commit
82fd82d534
2 changed files with 13 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
|||
* [cancel_action] now works in attack-related events.
|
||||
* [unit_type] upkeep= now works again. It was inadvertently broken during
|
||||
the 1.13 development cycle.
|
||||
* [filter_wml] now accepts [and] and [or] in addition to [not].
|
||||
### Miscellaneous and bug fixes
|
||||
* Fixed standing animation toggle not taking immediate effect (bug
|
||||
#1653).
|
||||
|
|
|
@ -1195,6 +1195,18 @@ bool config::matches(const config& filter) const
|
|||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if(i.key == "and") {
|
||||
if(!matches(i.cfg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if(i.key == "or") {
|
||||
if(matches(i.cfg)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue