mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
UnitFilter also matches TechFilter for that unit
This commit is contained in:
parent
624eefccab
commit
02d7325576
@ -301,8 +301,10 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction {
|
||||
"Nuclear Weapon" -> isNuclearWeapon()
|
||||
"Great Person" -> isGreatPerson()
|
||||
"Religious" -> hasUnique(UniqueType.ReligiousUnit)
|
||||
|
||||
else -> {
|
||||
if (type.matchesFilter(filter)) return true
|
||||
if (requiredTech != null && ruleset.technologies[requiredTech]?.matchesFilter(filter)==true) return true
|
||||
if (
|
||||
// Uniques using these kinds of filters should be deprecated and replaced with adjective-only parameters
|
||||
filter.endsWith(" units")
|
||||
|
@ -41,6 +41,7 @@ The following are allowed to be used:
|
||||
- `Nuclear Weapon`
|
||||
- `Great Person`, `Great`
|
||||
- `Embarked`
|
||||
- Matching [technologyfilter](#technologyfilter) for the tech this unit requires - e.g. `Modern Era`
|
||||
- Any exact unique the unit has
|
||||
- Any exact unique the unit type has
|
||||
- Any combination of the above (will match only if all match). The format is `{filter1} {filter2}` and can match any number of filters. For example: `[{Military} {Water}]` units, `[{non-air} {Armor}]` units, etc. No space or other text is allowed between the `[` and the first `{`.
|
||||
|
Loading…
Reference in New Issue
Block a user