diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index 2c4af59bf3f..cb10aa17f30 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -16,27 +16,58 @@ */ /datum/looping_sound + + ///A `/list` of `/atom`, destinations for the sound var/list/atom/output_atoms = list() + + /** + * A list with soundfiles, or a soundfile, to play for the intermediate steps + * + * Must contain at least one sound + */ var/mid_sounds + + ///The length to wait between playing mid_sounds var/mid_length + + ///Volume for the start sound var/start_volume + + ///A soundfile, played before starting the mid_sounds loop var/start_sound + + ///How long to wait before starting the main loop after playing start_sound var/start_length + + ///Volume for the end sound var/end_volume + + ///A soundfile, the sound played after the main loop has concluded var/end_sound + + ///Chance per loop to play a mid_sound var/chance + + ///Sound output volume var/volume = 100 + + ///Whether or not the sounds will vary in pitch when played var/vary = FALSE + + ///The max amount of loops to run for var/max_loops var/direct + + ///The extra range of the sound in tiles, defaults to 0. var/extra_range var/falloff + ///The ID of the timer that's used to loop the sounds. var/timerid /datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE) if(!mid_sounds) - WARNING("A looping sound datum was created without sounds to play.") + crash_with("A looping sound datum was created without sounds to play.") return output_atoms |= _output_atoms diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 212d39306ea..d105d7c949e 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -82,9 +82,11 @@ start_sound = 'sound/machines/computer/computer_start.ogg' start_length = 7.2 SECONDS start_volume = 10 + mid_sounds = list('sound/machines/computer/computer_mid1.ogg' = 1, 'sound/machines/computer/computer_mid2.ogg' = 1) + mid_length = 1.8 SECONDS end_sound = 'sound/machines/computer/computer_end.ogg' end_volume = 10 - volume = 3 + volume = 1 extra_range = -5.5 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/html/changelogs/fluffughost_fixloopingsoundcomputer.yml b/html/changelogs/fluffughost_fixloopingsoundcomputer.yml new file mode 100644 index 00000000000..43e6287e0a1 --- /dev/null +++ b/html/changelogs/fluffughost_fixloopingsoundcomputer.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Readded computer looping sounds at lower volume, as the mid_sounds are required for looping sounds." + - refactor: "Added some dmdoc to the looping sounds, and turned the warning+return to a crash_with to avoid further reintroduction of this kind of issues." diff --git a/sound/machines/computer/computer_mid1.ogg b/sound/machines/computer/computer_mid1.ogg new file mode 100644 index 00000000000..d183bf5b7af Binary files /dev/null and b/sound/machines/computer/computer_mid1.ogg differ diff --git a/sound/machines/computer/computer_mid2.ogg b/sound/machines/computer/computer_mid2.ogg new file mode 100644 index 00000000000..15e53ded809 Binary files /dev/null and b/sound/machines/computer/computer_mid2.ogg differ