From 6704056d3a22099aa3bc3af4a4d75288cc178b3e Mon Sep 17 00:00:00 2001 From: yuni Date: Tue, 17 Sep 2024 01:10:55 +0200 Subject: [PATCH] click3.ogg: add new sound for targeting and menu cursor movement --- assets/sounds/click3.ogg | Bin 0 -> 7086 bytes src/audio.rs | 3 +++ src/game.rs | 1 + src/hud.rs | 5 ++--- src/menu.rs | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 assets/sounds/click3.ogg diff --git a/assets/sounds/click3.ogg b/assets/sounds/click3.ogg new file mode 100644 index 0000000000000000000000000000000000000000..f0149fc9f67db62776f57197645dae933ff09772 GIT binary patch literal 7086 zcmb7Hc|6qJ_y3S=3E7DrA`B+RR-;IkFjiYPyQGPvs*0+L$|)6fNqHp3o#5u_>mh0A8{p}G-4~1T#Y5;e zm=5mikk!+-Wdhg%AmX^GNLxgI8VUe-0idA#R90x$%dM%lZ8cW6eYk(AIyWWD7WV?1l9*N_6V4adt+*(UTw=MNJAVro4 z1yT_aiGYqc;MQKUy~BMvzbzTfs|PCi*TC>Y5_}hs>CRx%HSg=&cS{n8pnGnTF7UQm zymvsncU`>i$O$XH69cMHDpJE*O&eunIBbKmLpeDGVuu5;!&z9GErYPdqHD1e|JfO? zOELik((nvvNXBtU#{1J5EYY#$%z!&RBn9%f-k(mHGfp|-nQ=8Z%OfGTG$(h7bdQrU z1z-ZF(A!MVt;L`ekKhc(nES{xx8(oYb+2_P0J>l-JN?A>yOF;P8zaJ90Jx{RNSRK5 zB_o`AC+@5f-k=k2`i5xphJ5MJzcvBfcChL4D;Zj!?Yw=qk6)vYs@}_QW~FXM{XcYT zft!qc0UeRLdo{}|f?X}mg%OqrP_4)Vc73jWOW=g~2Xm6S{kdOz;oQ0N1tftyYDO0=$3!lqxx2fK9sjov{tHGdG)zq&jt}n8pF13 z$>fE5xJtOOcQJXyL9rN2a7gh!qQFg+bWc0aD$2k|Y_>m$ih@Yae{S4onZ6?u1OMoK z>*8QC@8>fknNfBDSo9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%uaD-}ETv}SkebdMLtC&%AfGeo*ICv&oMK))rAukThj+e$#SrsK+#{PagOTCpHj zrQIQ)DV+7;sS9~aHy%jsly1QXN@DoLk6IL^&mZWRh>NUwUhvJ0b-a91_Y+Ej8Xd_t zh56VEb>n&|pIFHD-5|Av@|7##-Xa`OuP%&5aR!;R?CkiZHf=8ONt3<8WQ%iy%11)Z z-3Z;OJQQ+nny~P#t`3RMT`sGvl%?(cb+P!nG;`tory7<{$+H+cR5DY;!U@9D1Nb2g z+*hqWM}xbxgxKAy>pwPGxfP;rj3SE-i}Digrd|zqzA-h^JAVE8b?Vt>fx{o+`TCJY gRln9It3J=Y$cw-T+|yEKnwpvdBA((({j-4o0yA~0cK`qY literal 0 HcmV?d00001 diff --git a/src/audio.rs b/src/audio.rs index c0b3047..335efb4 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -64,6 +64,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[ (SfxType::OneOff, Sfx::GaspRelief, "sounds/gasprelief.ogg"), (SfxType::OneOff, Sfx::Achieve, "sounds/achieve.ogg"), (SfxType::OneOff, Sfx::Click, "sounds/click.ogg"), + (SfxType::OneOff, Sfx::Click3, "sounds/click3.ogg"), (SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"), (SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"), (SfxType::OneOff, Sfx::Drink, "sounds/drink.ogg"), @@ -89,6 +90,7 @@ pub enum Sfx { BGMActualJupiterRecording, BGMTakeoff, Click, + Click3, Connect, Crash, Drink, @@ -117,6 +119,7 @@ pub fn str2sfx(sfx_label: &str) -> Sfx { "exit" => Sfx::ExitVehicle, "honk" => Sfx::Honk, "click" => Sfx::Click, + "click3" => Sfx::Click3, "drink" => Sfx::Drink, "woosh" => Sfx::Woosh, "zoom" => Sfx::Zoom, diff --git a/src/game.rs b/src/game.rs index 564ea5b..d7bfdaa 100644 --- a/src/game.rs +++ b/src/game.rs @@ -218,6 +218,7 @@ pub fn handle_game_event( } } GameEvent::SetMenu(turn) => { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click)); settings.menu_active = turn.to_bool(settings.menu_active); for mut window in &mut q_window { window.cursor.grab_mode = if settings.menu_active { diff --git a/src/hud.rs b/src/hud.rs index dcf770a..16159a7 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -1080,7 +1080,6 @@ fn handle_input( fn handle_target_event( mut commands: Commands, - settings: Res, mut er_target: EventReader, mut ew_sfx: EventWriter, mut ew_achievement: EventWriter, @@ -1105,8 +1104,8 @@ fn handle_target_event( } } } - if play_sfx && !settings.mute_sfx { - ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click)); + if play_sfx { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3)); } break; // Only accept a single event per frame } diff --git a/src/menu.rs b/src/menu.rs index 48ee319..6eff193 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -543,7 +543,7 @@ pub fn handle_input( } else { menustate.cursor.saturating_sub(1) }; - ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click)); + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3)); ew_updatemenu.send(UpdateMenuEvent); } if keyboard_input.just_pressed(settings.key_back) @@ -555,7 +555,7 @@ pub fn handle_input( } else { menustate.cursor.saturating_add(1) }; - ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click)); + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3)); ew_updatemenu.send(UpdateMenuEvent); } if keyboard_input.just_pressed(settings.key_interact)