Skip to content

Commit

Permalink
Adds Soup boiling SFX (tgstation#83649)
Browse files Browse the repository at this point in the history
## About The Pull Request

In honor of the new sound effects general


https://github.com/tgstation/tgstation/assets/51863163/b2db8ee1-51ef-45a8-9cc8-31594d034ea5

Adds a sound effect that plays when soup is boiling (IE, it only plays
when smoke appears over the soup pot)

It has a sharp falloff and a distance penalty so it will really only be
heard in the kitchen (or though the kitchen's walls), maps with ranges
close to the counter like Metastation notwithstanding.

## Why It's Good For The Game

A touch of atmosphere

## Changelog

:cl: Melbert
sound: Boiling soup now makes a sound.
/:cl:
  • Loading branch information
MrMelbert authored Jun 3, 2024
1 parent b5247e8 commit 4d891c7
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 1 deletion.
15 changes: 15 additions & 0 deletions code/datums/looping_sounds/machinery_sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,18 @@
'sound/machines/terminal_button08.ogg' = 1,
)
mid_length = 0.3 SECONDS

/datum/looping_sound/soup
mid_sounds = list(
'sound/effects/soup_boil1.ogg' = 1,
'sound/effects/soup_boil2.ogg' = 1,
'sound/effects/soup_boil3.ogg' = 1,
'sound/effects/soup_boil4.ogg' = 1,
'sound/effects/soup_boil5.ogg' = 1,
)
mid_length = 3 SECONDS
volume = 80
end_sound = 'sound/effects/soup_boil_end.ogg'
end_volume = 60
extra_range = MEDIUM_RANGE_SOUND_EXTRARANGE
falloff_exponent = 4
13 changes: 12 additions & 1 deletion code/modules/food_and_drinks/machinery/stove_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
VAR_FINAL/obj/effect/abstract/particle_holder/soup_smoke
/// Typepath of particles to use for the particle holder.
VAR_FINAL/particle_type = /particles/smoke/steam/mild
/// Ref to our looping sound played when cooking
VAR_FINAL/datum/looping_sound/soup/soup_sound

/// The color of the flames around the burner.
var/flame_color = "#006eff"
/// Container's pixel x when placed on the stove
Expand All @@ -36,6 +39,12 @@
spawn_container.forceMove(parent)
add_container(spawn_container)

soup_sound = new(parent)

/datum/component/stove/Destroy()
QDEL_NULL(soup_sound)
return ..()

/datum/component/stove/RegisterWithParent()
RegisterSignal(parent, COMSIG_ATOM_ATTACKBY, PROC_REF(on_attackby))
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND_SECONDARY, PROC_REF(on_attack_hand_secondary))
Expand Down Expand Up @@ -235,7 +244,7 @@
update_smoke_type()
real_parent.update_appearance(UPDATE_OVERLAYS)

/datum/component/stove/proc/update_smoke_type(datum/source, new_temp, old_temp)
/datum/component/stove/proc/update_smoke_type(datum/source, ...)
SIGNAL_HANDLER

var/existing_temp = container?.reagents.chem_temp || 0
Expand All @@ -250,6 +259,7 @@

/datum/component/stove/proc/update_smoke()
if(on && container?.reagents.total_volume > 0)
soup_sound.start()
// Don't override existing particles, wasteful
if(isnull(soup_smoke) || soup_smoke.particles.type != particle_type)
QDEL_NULL(soup_smoke)
Expand All @@ -261,3 +271,4 @@
return

QDEL_NULL(soup_smoke)
soup_sound?.stop()
3 changes: 3 additions & 0 deletions sound/attributions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,6 @@ portal_close, portal_open_1 , portal_open_2 , portal_open_3 , portal_travel made

toilet-flush.ogg is made by shw489 (CC0):
https://freesound.org/people/shw489/sounds/234389/

soup_boil1.ogg through soup_boil5.ogg and soup_boil_end.ogg are taken from Boiling Soup from Freesoung.org (CC4) and converted to OGG / split apart (but is otherwise unchanged):
https://freesound.org/people/jorickhoofd/sounds/632783/
Binary file added sound/effects/soup_boil1.ogg
Binary file not shown.
Binary file added sound/effects/soup_boil2.ogg
Binary file not shown.
Binary file added sound/effects/soup_boil3.ogg
Binary file not shown.
Binary file added sound/effects/soup_boil4.ogg
Binary file not shown.
Binary file added sound/effects/soup_boil5.ogg
Binary file not shown.
Binary file added sound/effects/soup_boil_end.ogg
Binary file not shown.

0 comments on commit 4d891c7

Please sign in to comment.