mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 03:18:18 +07:00
Fix two sound credits (#4020)
This commit is contained in:
parent
a51978c960
commit
ab4441ad1f
@ -14,6 +14,7 @@ private enum class UncivSoundConstants (val value: String) {
|
||||
Whoosh("whoosh"),
|
||||
Bombard("bombard"),
|
||||
Slider("slider"),
|
||||
Construction("construction"),
|
||||
Silent(""),
|
||||
Custom("")
|
||||
}
|
||||
@ -52,6 +53,7 @@ class UncivSound private constructor (
|
||||
val Whoosh = UncivSound(UncivSoundConstants.Whoosh)
|
||||
val Bombard = UncivSound(UncivSoundConstants.Bombard)
|
||||
val Slider = UncivSound(UncivSoundConstants.Slider)
|
||||
val Construction = UncivSound(UncivSoundConstants.Construction)
|
||||
val Silent = UncivSound(UncivSoundConstants.Silent)
|
||||
/** Creates an UncivSound instance for a custom sound.
|
||||
* @param filename The base filename without extension.
|
||||
|
@ -284,7 +284,9 @@ class CityConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBase
|
||||
|
||||
if (!cannotAddConstructionToQueue(construction, cityScreen.city, cityScreen.city.cityConstructions)) {
|
||||
val addToQueueButton = ImageGetter.getImage("OtherIcons/New").apply { color = Color.BLACK }.surroundWithCircle(40f)
|
||||
addToQueueButton.onClick { addConstructionToQueue(construction, cityScreen.city.cityConstructions) }
|
||||
addToQueueButton.onClick(getConstructionSound(construction)) {
|
||||
addConstructionToQueue(construction, cityScreen.city.cityConstructions)
|
||||
}
|
||||
pickConstructionButton.add(addToQueueButton)
|
||||
}
|
||||
pickConstructionButton.row()
|
||||
@ -338,7 +340,9 @@ class CityConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBase
|
||||
|| cannotAddConstructionToQueue(construction, city, cityConstructions)) {
|
||||
button.disable()
|
||||
} else {
|
||||
button.onClick { addConstructionToQueue(construction, cityConstructions) }
|
||||
button.onClick(getConstructionSound(construction)) {
|
||||
addConstructionToQueue(construction, cityConstructions)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,6 +364,15 @@ class CityConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBase
|
||||
cityScreen.game.settings.addCompletedTutorialTask("Pick construction")
|
||||
}
|
||||
|
||||
fun getConstructionSound(construction: IConstruction): UncivSound {
|
||||
return when(construction) {
|
||||
is Building -> UncivSound.Construction
|
||||
is BaseUnit -> UncivSound.Promote
|
||||
PerpetualConstruction.gold -> UncivSound.Coin
|
||||
PerpetualConstruction.science -> UncivSound.Paper
|
||||
else -> UncivSound.Click
|
||||
}
|
||||
}
|
||||
|
||||
fun purchaseConstruction(construction: IConstruction) {
|
||||
val city = cityScreen.city
|
||||
|
@ -566,6 +566,8 @@ Sounds are from FreeSound.org and are either Creative Commons or Public Domain
|
||||
* [Woosh](https://soundbible.com/2068-Woosh.html) by Mark DiAngelo as 'slider' sound (CC Attribution 3.0 license)
|
||||
* [Tornado-Siren-II](https://soundbible.com/1937-Tornado-Siren-II.html) by Delilah as part of 'nuke' sound (CC Attribution 3.0 license)
|
||||
* [Explosion-Ultra-Bass](https://soundbible.com/1807-Explosion-Ultra-Bass.html) by Mark DiAngelo as part of 'nuke' sound (CC Attribution 3.0 license)
|
||||
* [Short Choir](https://freesound.org/people/Breviceps/sounds/444491/) by Breviceps as 'choir' for free great person pick
|
||||
|
||||
|
||||
# Music
|
||||
The following music is from https://filmmusic.io
|
||||
|
Loading…
Reference in New Issue
Block a user