diff --git a/LICENSE.md b/LICENSE.md index 140cc7a..8ce03c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -40,6 +40,7 @@ - https://pixabay.com/sound-effects/electric-fan-motor-blades-removed-13169 - https://pixabay.com/sound-effects/whoosh-blow-flutter-shortwav-14678/ - https://pixabay.com/sound-effects/dslr-camera-sounds-26117/ + - https://pixabay.com/sound-effects/beep-6-96243 - Music: [Cinematic Cello](https://pixabay.com/music/build-up-scenes-cinematic-cello-115667) by [Aleksey Chistilin](https://pixabay.com/users/lexin_music-28841948/), [Pixabay Content License](https://pixabay.com/service/license-summary) - Star chart based on the [HYG Stellar database](https://github.com/astronexus/HYG-Database) - Font Yupiter-Regular.ttf is placed under the SIL OPEN FONT LICENSE Version 1.1 and is based on: diff --git a/assets/sounds/achieve.ogg b/assets/sounds/achieve.ogg new file mode 100644 index 0000000..eba33c1 Binary files /dev/null and b/assets/sounds/achieve.ogg differ diff --git a/src/audio.rs b/src/audio.rs index 1bc70bf..0df7826 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -41,6 +41,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[ (SfxType::LoopSfx, Sfx::Ion, "sounds/ion.ogg"), (SfxType::LoopSfx, Sfx::Rocket, "sounds/rocket.ogg"), (SfxType::LoopSfx, Sfx::Thruster, "sounds/thruster.ogg"), + (SfxType::OneOff, Sfx::Achieve, "sounds/achieve.ogg"), (SfxType::OneOff, Sfx::Click, "sounds/click-button-140881-crop.ogg"), (SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"), (SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"), @@ -55,6 +56,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[ #[derive(Component, PartialEq, Hash, Eq, Copy, Clone)] pub enum Sfx { + Achieve, BGM, Click, Connect, @@ -74,6 +76,7 @@ pub enum Sfx { pub fn str2sfx(sfx_label: &str) -> Sfx { return match sfx_label { + "achieve" => Sfx::Achieve, "switch" => Sfx::Switch, "click" => Sfx::Click, "woosh" => Sfx::Woosh, diff --git a/src/game.rs b/src/game.rs index 28b5b46..209f7cc 100644 --- a/src/game.rs +++ b/src/game.rs @@ -147,6 +147,7 @@ pub fn handle_game_event( } } GameEvent::Achievement(name) => { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Achieve)); log.info(format!("Achievement accomplished: {name}!")); } }