mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 09:18:43 +07:00
Added sound effect for purchasing constructions and tiles
This commit is contained in:
@ -182,6 +182,7 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
||||
shouldToggleTilesWorked=true
|
||||
}
|
||||
}
|
||||
|
||||
tileGroup.onClick {
|
||||
selectedTile = tileInfo
|
||||
if (shouldToggleTilesWorked) {
|
||||
@ -251,7 +252,7 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
||||
if(tile.getOwner()==null && tile.neighbors.any{it.getCity()==city}){
|
||||
val goldCostOfTile = city.expansion.getGoldCostOfTile(tile)
|
||||
val buyTileButton = TextButton("Buy for [$goldCostOfTile] gold".tr(),skin)
|
||||
buyTileButton.onClick { city.expansion.buyTile(tile); game.screen = CityScreen(city); dispose() }
|
||||
buyTileButton.onClick("coin") { city.expansion.buyTile(tile); game.screen = CityScreen(city); dispose() }
|
||||
if(goldCostOfTile>city.civInfo.gold) buyTileButton.disable()
|
||||
tileTable.add(buyTileButton)
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class CityStatsTable(val cityScreen: CityScreen) : Table(){
|
||||
row()
|
||||
val buildingGoldCost = construction.getGoldCost(city.civInfo.policies.getAdoptedPolicies())
|
||||
val buildingBuyButton = TextButton("Buy for [$buildingGoldCost] gold".tr(), CameraStageBaseScreen.skin)
|
||||
buildingBuyButton.onClick {
|
||||
buildingBuyButton.onClick("coin") {
|
||||
city.cityConstructions.purchaseBuilding(city.cityConstructions.currentConstruction)
|
||||
update()
|
||||
}
|
||||
|
Reference in New Issue
Block a user