Merge pull request #302 from ninjatao/fix_acquire

Fix : can acquire tiles that already belong to the city.
This commit is contained in:
yairm210 2018-12-04 20:22:40 +02:00 committed by GitHub
commit bb78673edc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)