Fix: player being able to buy tiles outside the 3-tile radius (#1643)

This commit is contained in:
lyrjie 2020-01-09 21:18:03 +03:00 committed by Yair Morgenstern
parent bc83be1441
commit fe837d78ee

View file

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