From fe837d78ee9feec31e3c79fe42138b404cb3c53e Mon Sep 17 00:00:00 2001 From: lyrjie Date: Thu, 9 Jan 2020 21:18:03 +0300 Subject: [PATCH] Fix: player being able to buy tiles outside the 3-tile radius (#1643) --- core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt b/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt index c9bf445d5d..08ee48427f 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt @@ -46,7 +46,8 @@ class CityScreenTileTable(val city: CityInfo): Table(){ } innerTable.add(statsTable).row() - if(selectedTile.getOwner()==null && selectedTile.neighbors.any {it.getCity()==city}){ + if(selectedTile.getOwner()==null && selectedTile.neighbors.any {it.getCity()==city} + && selectedTile in city.tilesInRange){ val goldCostOfTile = city.expansion.getGoldCostOfTile(selectedTile) val buyTileButton = TextButton("Buy for [$goldCostOfTile] gold".tr(), CameraStageBaseScreen.skin)