Compare commits

..

2 commits

Author SHA1 Message Date
yuni 533a3a5543 add sound for drinking coffee/pizza 2024-09-15 04:52:04 +02:00
yuni fa9f1096cd add car door sounds when entering/exiting vehicles 2024-09-15 04:30:09 +02:00
9 changed files with 20 additions and 3 deletions

View file

@ -45,6 +45,8 @@
- zoom.ogg: Recorded a screw thread scraping against a saxophone ligature - zoom.ogg: Recorded a screw thread scraping against a saxophone ligature
- Other sounds: - Other sounds:
- achieve.ogg: UI Completed Status Alert Notification SFX001.wav [by Headphaze, CC BY 4.0](https://freesound.org/s/277033/) - achieve.ogg: UI Completed Status Alert Notification SFX001.wav [by Headphaze, CC BY 4.0](https://freesound.org/s/277033/)
- drink.ogg: [Pouring Beer into Short Glass by megashroom, CC0](https://freesound.org/s/390336/)
- enter.ogg, exit.ogg: [Getting Out of Car.wav by kingsrow, CC0](https://freesound.org/s/181568/)
- Takeoff.ogg: [By Serat, CC BY 4.0](https://freemusicarchive.org/music/serat/route-remastered/takeoff-remastered/) - Takeoff.ogg: [By Serat, CC BY 4.0](https://freemusicarchive.org/music/serat/route-remastered/takeoff-remastered/)
- JupiterRecording.ogg: An [actual Jupiter recording by NASA](https://archive.org/download/voyager-1-and-2-1990-jupiter-nasa-voyager-space-sounds-electronic), public domain. - JupiterRecording.ogg: An [actual Jupiter recording by NASA](https://archive.org/download/voyager-1-and-2-1990-jupiter-nasa-voyager-space-sounds-electronic), public domain.
- Processed by cutting out min 1:47-3:47 and applying a 10s linear crossfade at the end. Exported as ogg with quality=3, see [.kdenlive file](src/audio/JupiterRecording.kdenlive). - Processed by cutting out min 1:47-3:47 and applying a 10s linear crossfade at the end. Exported as ogg with quality=3, see [.kdenlive file](src/audio/JupiterRecording.kdenlive).

BIN
assets/sounds/drink.ogg Normal file

Binary file not shown.

BIN
assets/sounds/enter.ogg Normal file

Binary file not shown.

BIN
assets/sounds/exit.ogg Normal file

Binary file not shown.

View file

@ -495,7 +495,7 @@ pub fn handle_vehicle_enter_exit(
flashlight_trans.translation = Vec3::new(0.0, 0.0, 1.0); flashlight_trans.translation = Vec3::new(0.0, 0.0, 1.0);
} }
commands.entity(driver).insert(RigidBody::Dynamic); commands.entity(driver).insert(RigidBody::Dynamic);
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch)); ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::ExitVehicle));
commands.entity(vehicle).remove::<PlayerCamera>(); commands.entity(vehicle).remove::<PlayerCamera>();
commands.entity(driver).insert(PlayerCamera); commands.entity(driver).insert(PlayerCamera);
commands.entity(vehicle).remove::<PlayerDrivesThis>(); commands.entity(vehicle).remove::<PlayerDrivesThis>();

View file

@ -70,7 +70,10 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
(SfxType::OneOff, Sfx::Click, "sounds/click.ogg"), (SfxType::OneOff, Sfx::Click, "sounds/click.ogg"),
(SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"), (SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"),
(SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"), (SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"),
(SfxType::OneOff, Sfx::EnterVehicle, "sounds/growl.ogg"), (SfxType::OneOff, Sfx::Drink, "sounds/drink.ogg"),
(SfxType::OneOff, Sfx::EnterVehicle, "sounds/enter.ogg"),
(SfxType::OneOff, Sfx::ExitVehicle, "sounds/exit.ogg"),
(SfxType::OneOff, Sfx::Honk, "sounds/growl.ogg"),
( (
SfxType::OneOff, SfxType::OneOff,
Sfx::IncomingChatMessage, Sfx::IncomingChatMessage,
@ -92,10 +95,13 @@ pub enum Sfx {
Click, Click,
Connect, Connect,
Crash, Crash,
Drink,
ElectricMotor, ElectricMotor,
EnterVehicle, EnterVehicle,
ExitVehicle,
Gasp, Gasp,
GaspRelief, GaspRelief,
Honk,
IncomingChatMessage, IncomingChatMessage,
Ion, Ion,
Ping, Ping,
@ -111,7 +117,11 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
return match sfx_label { return match sfx_label {
"achieve" => Sfx::Achieve, "achieve" => Sfx::Achieve,
"switch" => Sfx::Switch, "switch" => Sfx::Switch,
"enter" => Sfx::EnterVehicle,
"exit" => Sfx::ExitVehicle,
"honk" => Sfx::Honk,
"click" => Sfx::Click, "click" => Sfx::Click,
"drink" => Sfx::Drink,
"woosh" => Sfx::Woosh, "woosh" => Sfx::Woosh,
"zoom" => Sfx::Zoom, "zoom" => Sfx::Zoom,
"chat" => Sfx::IncomingChatMessage, "chat" => Sfx::IncomingChatMessage,

View file

@ -947,6 +947,7 @@ pub fn handle_chat_scripts(
}); });
} }
"drinkpizza" => { "drinkpizza" => {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Drink));
ew_achievement.send(game::AchievementEvent::DrinkPizza); ew_achievement.send(game::AchievementEvent::DrinkPizza);
} }
_ => { _ => {

View file

@ -285,6 +285,7 @@
- label: getcoffee - label: getcoffee
- Coming right up your feeding tube! - Coming right up your feeding tube!
- system: Received Old Earth Soykaf - system: Received Old Earth Soykaf
sound: drink
- goto: served - goto: served
- Surprise me.: - Surprise me.:
- Hmm... - Hmm...

View file

@ -361,7 +361,10 @@ fn handle_cheats(
if key_input.just_pressed(settings.key_cheat_god_mode) { if key_input.just_pressed(settings.key_cheat_god_mode) {
settings.god_mode ^= true; settings.god_mode ^= true;
if settings.god_mode { if settings.god_mode {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::EnterVehicle)); ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Honk));
}
else {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
} }
} }
if !settings.god_mode && !settings.dev_mode { if !settings.god_mode && !settings.dev_mode {