mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 11:32:04 +00:00
Implement a "ka-ching" sound effect on kill (#2097)
## Description: Building off of [this PR](https://github.com/openfrontio/OpenFrontIO/pull/2090) which implemented music, I extend this functionality to add sound effects. Diff will be reduced if and when that PR gets merged! I think the game would benefit from more sound effects, and adding a "ka-ching" sound effect on kill seems like an easy place to start. The ka-ching sound effect was found [here](https://freesound.org/people/AKkingStudio/sounds/684165/) and is licensed under Creative Commons. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced Demo video with sound: https://github.com/user-attachments/assets/18c857a4-a741-492a-bbc1-68d4f3ba38da ## Please put your Discord username so you can be contacted if a bug or regression is found: basedgob --------- Co-authored-by: icslucas <carolinacarazolli@gmail.com>
This commit is contained in:
@@ -176,4 +176,12 @@ export class UserSettings {
|
||||
setBackgroundMusicVolume(volume: number): void {
|
||||
this.setFloat("settings.backgroundMusicVolume", volume);
|
||||
}
|
||||
|
||||
soundEffectsVolume(): number {
|
||||
return this.getFloat("settings.soundEffectsVolume", 1);
|
||||
}
|
||||
|
||||
setSoundEffectsVolume(volume: number): void {
|
||||
this.setFloat("settings.soundEffectsVolume", volume);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user