Accept [and] and [or] in [filter_wml]

This commit is contained in:
Celtic Minstrel 2018-03-15 00:17:31 -04:00 committed by Charles Dang
parent 79b7e08573
commit 82fd82d534
2 changed files with 13 additions and 0 deletions

View file

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

View file

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