diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index c79e9f61822..2ed95232df1 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -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 diff --git a/code/modules/food_and_drinks/machinery/stove_component.dm b/code/modules/food_and_drinks/machinery/stove_component.dm index d46434ce111..fcbabafc2d1 100644 --- a/code/modules/food_and_drinks/machinery/stove_component.dm +++ b/code/modules/food_and_drinks/machinery/stove_component.dm @@ -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 @@ -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)) @@ -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 @@ -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) @@ -261,3 +271,4 @@ return QDEL_NULL(soup_smoke) + soup_sound?.stop() diff --git a/sound/attributions.txt b/sound/attributions.txt index 502c412153a..a9e2c697531 100644 --- a/sound/attributions.txt +++ b/sound/attributions.txt @@ -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/ diff --git a/sound/effects/soup_boil1.ogg b/sound/effects/soup_boil1.ogg new file mode 100644 index 00000000000..0c869bb94fb Binary files /dev/null and b/sound/effects/soup_boil1.ogg differ diff --git a/sound/effects/soup_boil2.ogg b/sound/effects/soup_boil2.ogg new file mode 100644 index 00000000000..524d3b8c537 Binary files /dev/null and b/sound/effects/soup_boil2.ogg differ diff --git a/sound/effects/soup_boil3.ogg b/sound/effects/soup_boil3.ogg new file mode 100644 index 00000000000..59a4c62ac40 Binary files /dev/null and b/sound/effects/soup_boil3.ogg differ diff --git a/sound/effects/soup_boil4.ogg b/sound/effects/soup_boil4.ogg new file mode 100644 index 00000000000..4c18f4a353f Binary files /dev/null and b/sound/effects/soup_boil4.ogg differ diff --git a/sound/effects/soup_boil5.ogg b/sound/effects/soup_boil5.ogg new file mode 100644 index 00000000000..a62bc985f4c Binary files /dev/null and b/sound/effects/soup_boil5.ogg differ diff --git a/sound/effects/soup_boil_end.ogg b/sound/effects/soup_boil_end.ogg new file mode 100644 index 00000000000..7931242a4cf Binary files /dev/null and b/sound/effects/soup_boil_end.ogg differ