From 26a4a3738990ffc7f51476aed0951d15dfb4d587 Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Tue, 4 Dec 2018 22:26:05 +0800 Subject: [PATCH] Fix : can acquire tiles that already belong to the city. --- core/src/com/unciv/ui/cityscreen/CityScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/cityscreen/CityScreen.kt b/core/src/com/unciv/ui/cityscreen/CityScreen.kt index ed01eb2b..fb1d068e 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreen.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreen.kt @@ -240,7 +240,8 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() { if(goldCostOfTile>city.civInfo.gold) buyTileButton.disable() tileTable.add(buyTileButton) } - if(tile.getOwner()!=null && tile.getOwner()!!.isPlayerCivilization() + if(tile.getOwner()!=null && tile.getCity()!=city + && tile.getOwner()!!.isPlayerCivilization() && tile.arialDistanceTo(city.getCenterTile()) <= 3 && tile.neighbors.any{it.getCity()==city}){ val acquireTileButton = TextButton("Acquire".tr(),skin)