add oxygen refill sound
This commit is contained in:
parent
6e51c69691
commit
83ab703ea9
|
@ -35,6 +35,10 @@
|
||||||
- gasp.ogg: Gasping for air
|
- gasp.ogg: Gasping for air
|
||||||
- gasprelief.ogg: Heavy breathing
|
- gasprelief.ogg: Heavy breathing
|
||||||
- growl.ogg: Growled into a Xaphoon (2024-09-13@18:21), lowered by an octave, added reverb
|
- growl.ogg: Growled into a Xaphoon (2024-09-13@18:21), lowered by an octave, added reverb
|
||||||
|
- refill.ogg: This consists of 3 overlaid parts:
|
||||||
|
- Starting clang: Hit a fire extinguisher with a chunk of metal
|
||||||
|
- Main hiss: Sprayed a can of WD-40, applied high pass filter (1khz, 36db roll-off per octave), fade out
|
||||||
|
- Finishing hiss: Opened a beer bottle
|
||||||
- thruster.ogg: Sprayed a can of WD-40, applied low pass filter (2khz, 6db roll-off per octave)
|
- thruster.ogg: Sprayed a can of WD-40, applied low pass filter (2khz, 6db roll-off per octave)
|
||||||
- wakeup.ogg: Heavy breathing
|
- wakeup.ogg: Heavy breathing
|
||||||
- woosh.ogg: Blew into the mic, pitch lowered by 24 semitones
|
- woosh.ogg: Blew into the mic, pitch lowered by 24 semitones
|
||||||
|
|
BIN
assets/sounds/refill.ogg
Normal file
BIN
assets/sounds/refill.ogg
Normal file
Binary file not shown.
|
@ -78,6 +78,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
|
||||||
),
|
),
|
||||||
(SfxType::OneOff, Sfx::Ping, "sounds/connect.ogg"),
|
(SfxType::OneOff, Sfx::Ping, "sounds/connect.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Switch, "sounds/click2.ogg"),
|
(SfxType::OneOff, Sfx::Switch, "sounds/click2.ogg"),
|
||||||
|
(SfxType::OneOff, Sfx::Refill, "sounds/refill.ogg"),
|
||||||
(SfxType::OneOff, Sfx::WakeUp, "sounds/wakeup.ogg"),
|
(SfxType::OneOff, Sfx::WakeUp, "sounds/wakeup.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Woosh, "sounds/woosh.ogg"),
|
(SfxType::OneOff, Sfx::Woosh, "sounds/woosh.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Zoom, "sounds/zoom.ogg"),
|
(SfxType::OneOff, Sfx::Zoom, "sounds/zoom.ogg"),
|
||||||
|
@ -98,6 +99,7 @@ pub enum Sfx {
|
||||||
IncomingChatMessage,
|
IncomingChatMessage,
|
||||||
Ion,
|
Ion,
|
||||||
Ping,
|
Ping,
|
||||||
|
Refill,
|
||||||
Switch,
|
Switch,
|
||||||
Thruster,
|
Thruster,
|
||||||
WakeUp,
|
WakeUp,
|
||||||
|
@ -115,6 +117,7 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
|
||||||
"chat" => Sfx::IncomingChatMessage,
|
"chat" => Sfx::IncomingChatMessage,
|
||||||
"ping" => Sfx::Ping,
|
"ping" => Sfx::Ping,
|
||||||
"connect" => Sfx::Connect,
|
"connect" => Sfx::Connect,
|
||||||
|
"refill" => Sfx::Refill,
|
||||||
"entervehicle" => Sfx::EnterVehicle,
|
"entervehicle" => Sfx::EnterVehicle,
|
||||||
"crash" => Sfx::Ping,
|
"crash" => Sfx::Ping,
|
||||||
_ => Sfx::Click,
|
_ => Sfx::Click,
|
||||||
|
|
|
@ -861,6 +861,7 @@ pub fn handle_chat_scripts(
|
||||||
"refilloxygen" => {
|
"refilloxygen" => {
|
||||||
if let Ok(mut amount) = param1.to_string().parse::<f32>() {
|
if let Ok(mut amount) = param1.to_string().parse::<f32>() {
|
||||||
for (_, mut suit, _) in q_player.iter_mut() {
|
for (_, mut suit, _) in q_player.iter_mut() {
|
||||||
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Refill));
|
||||||
if param2.is_empty() {
|
if param2.is_empty() {
|
||||||
suit.oxygen = (suit.oxygen + amount).clamp(0.0, suit.oxygen_max);
|
suit.oxygen = (suit.oxygen + amount).clamp(0.0, suit.oxygen_max);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue