diff --git a/Credits.md b/Credits.md index 699d2c599e..dcbd8ab4db 100644 --- a/Credits.md +++ b/Credits.md @@ -399,4 +399,5 @@ Sounds are from FreeSound.org and are either Creative Commons or Public Domain * [SawInOut01](https://freesound.org/people/kingof_thelab/sounds/340243/) By kingof_thelab for construction picking? * [Chain Snare #1](https://freesound.org/people/lovesbody/sounds/322079/) By lovesbody for Fortify * [Level up](https://freesound.org/people/Marregheriti/sounds/266100/) By Marregheriti for Promote action -* [levelup](https://freesound.org/people/Seidhepriest/sounds/382915/) By Seidhepriest for special actions (free tech, build city, hhurry wonder etc. \ No newline at end of file +* [levelup](https://freesound.org/people/Seidhepriest/sounds/382915/) By Seidhepriest for special actions (free tech, build city, hhurry wonder etc. +* [Coin](https://freesound.org/people/TheDJoe93/sounds/97373/) By TheDJoe93 for purchasing tiles and constructions \ No newline at end of file diff --git a/android/assets/sounds/coin.mp3 b/android/assets/sounds/coin.mp3 new file mode 100644 index 0000000000..1af053174b Binary files /dev/null and b/android/assets/sounds/coin.mp3 differ diff --git a/core/src/com/unciv/ui/cityscreen/CityScreen.kt b/core/src/com/unciv/ui/cityscreen/CityScreen.kt index f9271b99ac..f0c66027a0 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreen.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreen.kt @@ -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) } diff --git a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt index 131e6cbb74..19b47393c7 100644 --- a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt @@ -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() }