diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 18ebe6e9ac..24af28d408 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -1172,6 +1172,7 @@ Pick improvement = Provides [resource] = Provides [amount] [resource] = Replaces [improvement] = +Not in city work range = Pick now! = Remove [feature] first = Research [tech] first = diff --git a/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt index 8c85d71d30..f3457debc9 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt @@ -163,6 +163,18 @@ class ImprovementPickerScreen( tile.getCity(), cityUniqueCache ) + + //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 + // worked by a city's population + if (stats.values.any { it > 0f } + && !improvement.name.startsWith(Constants.remove) + && !improvement.isRoad() + && tile.owningCity != null + && !tile.owningCity!!.getWorkableTiles().contains(tile) + ) + labelText += "\n" + "Not in city work range".tr() + val statsTable = getStatsTable(stats) statIcons.add(statsTable).padLeft(13f)