"Obsolete with [techName]" unique works with improvements

This commit is contained in:
Yair Morgenstern 2021-03-03 23:49:31 +02:00
parent 153f4f98d3
commit 87e0dedaf4
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@ Resolved #3639 - City states that can't be connected by land no longer assign ro
Fix when Trade Gold = 0 it also shows in offer - By lishaoxia1985 Fix when Trade Gold = 0 it also shows in offer - By lishaoxia1985
Translation upates Translation updates
## 3.13.4 ## 3.13.4

View File

@ -305,6 +305,9 @@ open class TileInfo {
improvement.uniqueTo != null && improvement.uniqueTo != civInfo.civName -> false improvement.uniqueTo != null && improvement.uniqueTo != civInfo.civName -> false
improvement.techRequired != null && !civInfo.tech.isResearched(improvement.techRequired!!) -> false improvement.techRequired != null && !civInfo.tech.isResearched(improvement.techRequired!!) -> false
getOwner() != civInfo && !improvement.hasUnique("Can be built outside your borders") -> false getOwner() != civInfo && !improvement.hasUnique("Can be built outside your borders") -> false
improvement.uniqueObjects.any {
it.placeholderText == "Obsolete with []" && civInfo.tech.isResearched(it.params[0])
} -> return false
else -> canImprovementBeBuiltHere(improvement, hasViewableResource(civInfo)) else -> canImprovementBeBuiltHere(improvement, hasViewableResource(civInfo))
} }
} }