diff --git a/Credits.md b/Credits.md index dcbd8ab4db..e02f105906 100644 --- a/Credits.md +++ b/Credits.md @@ -394,10 +394,11 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc Sounds are from FreeSound.org and are either Creative Commons or Public Domain -* [Click 01_Minimal UI Sounds](https://freesound.org/people/cabled_mess/sounds/370962/) By cabled_mess for most clicks -* [Pencil1](https://freesound.org/people/stijn/sounds/43673/) By stijn for opening and closing the tech picker +* [Click 01_Minimal UI Sounds](https://freesound.org/people/cabled_mess/sounds/370962/) By cabled_mess as 'click' for most clicks +* [Pencil1](https://freesound.org/people/stijn/sounds/43673/) By stijn as 'paper' for opening and closing the tech picker * [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. -* [Coin](https://freesound.org/people/TheDJoe93/sounds/97373/) By TheDJoe93 for purchasing tiles and constructions \ No newline at end of file +* [Chain Snare #1](https://freesound.org/people/lovesbody/sounds/322079/) By lovesbody as 'fortify' +* [Level up](https://freesound.org/people/Marregheriti/sounds/266100/) By Marregheriti as 'promote' for Promote action and upgrading units +* [levelup](https://freesound.org/people/Seidhepriest/sounds/382915/) By Seidhepriest as 'chimes' for special actions (free tech, build city, hurry wonder etc.) +* [Coin](https://freesound.org/people/TheDJoe93/sounds/97373/) By TheDJoe93 as 'coin' for purchasing tiles and constructions +* [fast simple chop 1](https://freesound.org/people/dave.des/sounds/127196/) By dave.dev as 'whoosh' for moving units around \ No newline at end of file diff --git a/android/assets/sounds/whoosh.mp3 b/android/assets/sounds/whoosh.mp3 new file mode 100644 index 0000000000..8aa16a65bf Binary files /dev/null and b/android/assets/sounds/whoosh.mp3 differ diff --git a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt index 29501ec721..470edb32e7 100644 --- a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt +++ b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt @@ -129,7 +129,7 @@ fun Label.setFontSize(size:Int): Label { fun Actor.onClick(sound:String,function: () -> Unit){ this.addListener(object : ClickListener() { override fun clicked(event: InputEvent?, x: Float, y: Float) { - Sounds.play(sound) + if(sound!="") Sounds.play(sound) function() } } ) diff --git a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt index 74ec188477..e409199bea 100644 --- a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt +++ b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt @@ -140,7 +140,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap: moveHereButton.addActor(unitIcon) if (dto.unit.currentMovement > 0) - moveHereButton.onClick { + moveHereButton.onClick("") { // this can take a long time, because of the unit-to-tile calculation needed, so we put it in a different thread kotlin.concurrent.thread { if (dto.unit.movementAlgs().canReach(dto.tileInfo)) { @@ -151,6 +151,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap: // I can't think of any way to avoid this, // but it's so rare and edge-case-y that ignoring its failure is actually acceptable, hence the empty catch dto.unit.movementAlgs().headTowards(dto.tileInfo) + Sounds.play("whoosh") if (dto.unit.currentTile != dto.tileInfo) dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt() }