Resolved #13089 - better resource filter documentation

This commit is contained in:
yairm210 2025-03-23 17:37:28 +02:00
parent 5430954df3
commit f5ba786e61
2 changed files with 7 additions and 2 deletions

View File

@ -195,6 +195,7 @@ class TileResource : RulesetStatsObject(), GameResource {
fun matchesSingleFilter(filter: String) = when (filter) {
name -> true
"any" -> true
"all" -> true
resourceType.name -> true
else -> improvementStats?.any { filter == it.key.name } == true
}

View File

@ -235,8 +235,12 @@ These can be strung together with ", " between them, for example: `+2 Production
## resourceFilter
At the moment, only used for the `"Improves [resourceFilter] resource in this tile"` Unique on Improvements.
Allows filtering resources by their name, their type, or by any Stat listed in their `improvementStats` property. The `all` keyword works too.
Allowed values:
- Resource name
- `any`, `all`
- Resource type: `Strategic`, `Luxury`, `Bonus`
- Stat provided by the resource when improved (e.g. `Food`)
## stockpiledResource