Fix : can acquire tiles that already belong to the city.

This commit is contained in:
Duan Tao 2018-12-04 22:26:05 +08:00
parent eba64d38ee
commit 26a4a37389

View File

@ -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)