Fix: "Sell the building" button being randomly disabled (#1611)

* Fix: "Sell the building" button being randomly disabled based on the sell price

* Fix: `sellBuildingButton` being enabled in puppet cities

Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
This commit is contained in:
lyrjie
2020-01-04 22:01:06 +03:00
committed by Yair Morgenstern
parent d667638293
commit 2af847b3a6

View File

@ -83,7 +83,7 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS
cityScreen.update()
}, cityScreen)
}
if(cityScreen.city.hasSoldBuildingThisTurn || sellAmount > cityScreen.city.civInfo.gold
if (cityScreen.city.hasSoldBuildingThisTurn || cityScreen.city.isPuppet
|| !UncivGame.Current.worldScreen.isPlayersTurn)
sellBuildingButton.disable()
}