Checking if a tile is in work range now checks all cities (#10978)

This commit is contained in:
Oskar Niesen
2024-01-21 11:13:11 -06:00
committed by GitHub
parent 169ccf5d03
commit bb969efc12

View File

@ -161,13 +161,13 @@ class ImprovementPickerScreen(
) )
//Warn when the current improvement will increase a stat for the tile, //Warn when the current improvement will increase a stat for the tile,
// but the tile is outside of the range (> 3 tiles from city center) that can be // but the tile is outside of the range (> 3 tiles from any city center) that can be
// worked by a city's population // worked by a city's population
if (tile.owningCity != null if (tile.owningCity != null
&& !improvement.isRoad() && !improvement.isRoad()
&& stats.values.any { it > 0f } && stats.values.any { it > 0f }
&& !improvement.name.startsWith(Constants.remove) && !improvement.name.startsWith(Constants.remove)
&& !tile.owningCity!!.getWorkableTiles().contains(tile) && !tile.getTilesInDistance(3).any { it.isCityCenter() && it.getCity()!!.civ == currentPlayerCiv }
) )
labelText += "\n" + "Not in city work range".tr() labelText += "\n" + "Not in city work range".tr()