Add "Improvement" as an improvement filter (#9906)

* Add "Improvement" as an improvement filter

* Update docs, change from non road improvement to all improvement
This commit is contained in:
SeventhM 2023-08-16 07:59:54 -07:00 committed by GitHub
parent 548b536818
commit 6e3d4d99e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -26,7 +26,7 @@ class TileImprovement : RulesetStatsObject() {
override fun getUniqueTarget() = UniqueTarget.Improvement
val shortcutKey: Char? = null
// This is the base cost. A cost of 0 means created instead of buildable.
val turnsToBuild: Int = -1
var turnsToBuild: Int = -1
fun getTurnsToBuild(civInfo: Civilization, unit: MapUnit): Int {
@ -89,6 +89,7 @@ class TileImprovement : RulesetStatsObject() {
return when (filter) {
name -> true
"All" -> true
"Improvement" -> true // For situations involing tileFilter
"All Road" -> isRoad()
"Great Improvement", "Great" -> isGreatImprovement()
in uniqueMap -> true

View File

@ -93,6 +93,7 @@ cityFilters allow us to choose the range of cities affected by this unique:
- `in non-enemy foreign cities` - In all cities owned by civs other than you that you are not at war with
- `in foreign cities`
- `in annexed cities`
- `in puppeted cities`
- `in holy cities`
- `in City-State cities`
- `in cities following this religion` - Should only be used in pantheon/follower uniques for religions
@ -192,9 +193,10 @@ So for instance, the unique "[stats] from [tileFilter] tiles [cityFilter]" can m
## tileFilter
Any of:
- [terrainFilter](#terrainfilter) for this tile
- [improvementFilter](#improvementfilter) for this tile
- `unimproved' if no improvement exists
- [terrainFilter](#terrainfilter) for this tile
- [improvementFilter](#improvementfilter) for this tile
- `Improvement` for all improvements
- `unimproved` if no improvement exists
## terrainQuality