leak.ogg: play depressurization sound effect when taking off helmet

This commit is contained in:
yuni 2024-11-23 02:54:53 +01:00
parent d8786b1c13
commit f866e9e76a
3 changed files with 5 additions and 0 deletions

BIN
assets/sounds/leak.ogg Normal file

Binary file not shown.

View file

@ -78,6 +78,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
Sfx::IncomingChatMessage,
"sounds/connect.ogg",
),
(SfxType::OneOff, Sfx::Leak, "sounds/leak.ogg"),
(SfxType::OneOff, Sfx::Ping, "sounds/connect.ogg"),
(SfxType::OneOff, Sfx::Phone, "sounds/phone.ogg"),
(SfxType::OneOff, Sfx::PowerDown, "sounds/powerdown.ogg"),
@ -111,6 +112,7 @@ pub enum Sfx {
Honk,
IncomingChatMessage,
Ion,
Leak,
Ping,
Phone,
PowerDown,
@ -137,6 +139,7 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
"zoom" => Sfx::Zoom,
"cat" => Sfx::Cat,
"chat" => Sfx::IncomingChatMessage,
"leak" => Sfx::Leak,
"ping" => Sfx::Ping,
"phone" => Sfx::Phone,
"powerdown" => Sfx::PowerDown,

View file

@ -339,6 +339,7 @@ fn handle_player_death(
q_noscenes: Query<Entity, (With<world::DespawnOnPlayerDeath>, Without<SceneInstance>)>,
mut scene_spawner: ResMut<SceneSpawner>,
mut active_asteroids: ResMut<world::ActiveAsteroids>,
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
mut ew_deathscreen: EventWriter<menu::DeathScreenEvent>,
mut log: ResMut<hud::Log>,
@ -363,6 +364,7 @@ fn handle_player_death(
match death.0 {
actor::DamageType::Depressurization => {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Leak));
settings.death_cause = "Depressurization".to_string();
ew_effect.send(visual::SpawnEffectEvent {
class: visual::Effects::FadeIn(Color::BLACK),