mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-03 00:45:19 -04:00
Fixed crash when selecting worker (#4273)
When making the changes in workers in #4252, I accidentally overlooked that Constants.workerUnique doesn't have params, and this should be the right way to write it.
This commit is contained in:
parent
8549931360
commit
30ac1dae1c
@ -925,7 +925,8 @@ class MapUnit {
|
|||||||
|
|
||||||
fun canBuildImprovement(improvement: TileImprovement, tile: TileInfo = currentTile): Boolean {
|
fun canBuildImprovement(improvement: TileImprovement, tile: TileInfo = currentTile): Boolean {
|
||||||
// Constants.workerUnique deprecated since 3.15.5
|
// Constants.workerUnique deprecated since 3.15.5
|
||||||
val matchingUniques = getMatchingUniques(Constants.canBuildImprovements) + getMatchingUniques(Constants.workerUnique)
|
if (hasUnique(Constants.workerUnique)) return true
|
||||||
|
val matchingUniques = getMatchingUniques(Constants.canBuildImprovements)
|
||||||
return matchingUniques.any { improvement.matchesFilter(it.params[0]) || tile.matchesTerrainFilter(it.params[0]) }
|
return matchingUniques.any { improvement.matchesFilter(it.params[0]) || tile.matchesTerrainFilter(it.params[0]) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user