diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index d9cf7ed668c..7c26c76d0dd 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -10,6 +10,8 @@ var/mid_length_vary = 0 /// If we should always play each sound once per loop of all sounds. Weights here only really effect order, and could be disgarded var/each_once = FALSE + /// Whether if the sounds should be played in order or not. Defaults to FALSE. + var/in_order = FALSE /// Override for volume of start sound. var/start_volume /// (soundfile) Played before starting the mid_sounds loop. @@ -50,6 +52,8 @@ var/loop_started = FALSE /// If we're using cut_mid, this is the list we cut from var/list/cut_list + /// The index of the current song we're playing in the mid_sounds list, only used if in_order is used + var/audio_index = 1 // Args /// Do we skip the starting sounds? @@ -169,6 +173,12 @@ . = pick_weight(.) return . + if(in_order) + . = play_from + audio_index++ + if(audio_index > length(play_from)) + audio_index = 1 + return .[audio_index] if(!length(cut_list)) cut_list = shuffle(play_from.Copy()) diff --git a/code/datums/looping_sounds/music.dm b/code/datums/looping_sounds/music.dm index db1a09c9d5b..3aef75f3802 100644 --- a/code/datums/looping_sounds/music.dm +++ b/code/datums/looping_sounds/music.dm @@ -1,18 +1,20 @@ -/datum/looping_sound/local_forecast - start_sound = 'sound/ambience/music/local_forecast/local_forecast1.ogg' - start_length = 5.83 SECONDS +/datum/looping_sound/elevator_music + start_sound = 'sound/ambience/music/elevator/elevator-01.ogg' + start_length = 7.62 SECONDS mid_sounds = list( - 'sound/ambience/music/local_forecast/local_forecast2.ogg' = 6, - 'sound/ambience/music/local_forecast/local_forecast3.ogg' = 5, - 'sound/ambience/music/local_forecast/local_forecast4.ogg' = 4, - 'sound/ambience/music/local_forecast/local_forecast5.ogg' = 3, - 'sound/ambience/music/local_forecast/local_forecast6.ogg' = 2, - 'sound/ambience/music/local_forecast/local_forecast7.ogg' = 1, + 'sound/ambience/music/elevator/elevator-01.ogg', + 'sound/ambience/music/elevator/elevator-02.ogg', + 'sound/ambience/music/elevator/elevator-03.ogg', + 'sound/ambience/music/elevator/elevator-04.ogg', + 'sound/ambience/music/elevator/elevator-05.ogg', + 'sound/ambience/music/elevator/elevator-06.ogg', + 'sound/ambience/music/elevator/elevator-07.ogg', + 'sound/ambience/music/elevator/elevator-08.ogg', ) - mid_length = 5.83 SECONDS + mid_length = 7.62 SECONDS - end_sound = 'sound/ambience/music/local_forecast/local_forecast8.ogg' + end_sound = 'sound/ambience/music/elevator/elevator-08.ogg' volume = 20 falloff_exponent = 5 @@ -21,3 +23,6 @@ ignore_walls = FALSE use_reverb = FALSE each_once = TRUE + skip_starting_sounds = TRUE + in_order = TRUE + direct = TRUE diff --git a/code/modules/industrial_lift/elevator/elevator_panel.dm b/code/modules/industrial_lift/elevator/elevator_panel.dm index 9d174b124ef..ddbcd5c81c1 100644 --- a/code/modules/industrial_lift/elevator/elevator_panel.dm +++ b/code/modules/industrial_lift/elevator/elevator_panel.dm @@ -52,7 +52,7 @@ var/light_mask = "elev-light-mask" /// The soundloop of elevator music - var/datum/looping_sound/local_forecast/elevator_music + var/datum/looping_sound/elevator_music/elevator_music /// Will the elevator music play? var/elevator_music_toggle = TRUE diff --git a/sound/ambience/music/elevator/elevator-01.ogg b/sound/ambience/music/elevator/elevator-01.ogg new file mode 100644 index 00000000000..0f965724163 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-01.ogg differ diff --git a/sound/ambience/music/elevator/elevator-02.ogg b/sound/ambience/music/elevator/elevator-02.ogg new file mode 100644 index 00000000000..f401f77c914 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-02.ogg differ diff --git a/sound/ambience/music/elevator/elevator-03.ogg b/sound/ambience/music/elevator/elevator-03.ogg new file mode 100644 index 00000000000..9d3b865f784 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-03.ogg differ diff --git a/sound/ambience/music/elevator/elevator-04.ogg b/sound/ambience/music/elevator/elevator-04.ogg new file mode 100644 index 00000000000..fd995aab3f6 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-04.ogg differ diff --git a/sound/ambience/music/elevator/elevator-05.ogg b/sound/ambience/music/elevator/elevator-05.ogg new file mode 100644 index 00000000000..b1eda876c39 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-05.ogg differ diff --git a/sound/ambience/music/elevator/elevator-06.ogg b/sound/ambience/music/elevator/elevator-06.ogg new file mode 100644 index 00000000000..e74b4ded7e2 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-06.ogg differ diff --git a/sound/ambience/music/elevator/elevator-07.ogg b/sound/ambience/music/elevator/elevator-07.ogg new file mode 100644 index 00000000000..e2b124214ba Binary files /dev/null and b/sound/ambience/music/elevator/elevator-07.ogg differ diff --git a/sound/ambience/music/elevator/elevator-08.ogg b/sound/ambience/music/elevator/elevator-08.ogg new file mode 100644 index 00000000000..ba7b404a007 Binary files /dev/null and b/sound/ambience/music/elevator/elevator-08.ogg differ diff --git a/sound/ambience/music/local_forecast/local_forecast1.ogg b/sound/ambience/music/local_forecast/local_forecast1.ogg deleted file mode 100644 index 390ff6a38ce..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast1.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast2.ogg b/sound/ambience/music/local_forecast/local_forecast2.ogg deleted file mode 100644 index 974b12afc06..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast2.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast3.ogg b/sound/ambience/music/local_forecast/local_forecast3.ogg deleted file mode 100644 index 774704bf377..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast3.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast4.ogg b/sound/ambience/music/local_forecast/local_forecast4.ogg deleted file mode 100644 index 0862c08f067..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast4.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast5.ogg b/sound/ambience/music/local_forecast/local_forecast5.ogg deleted file mode 100644 index a9f0b09687a..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast5.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast6.ogg b/sound/ambience/music/local_forecast/local_forecast6.ogg deleted file mode 100644 index e8e7170b12f..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast6.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast7.ogg b/sound/ambience/music/local_forecast/local_forecast7.ogg deleted file mode 100644 index cec2c81c58b..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast7.ogg and /dev/null differ diff --git a/sound/ambience/music/local_forecast/local_forecast8.ogg b/sound/ambience/music/local_forecast/local_forecast8.ogg deleted file mode 100644 index 68c49ef915f..00000000000 Binary files a/sound/ambience/music/local_forecast/local_forecast8.ogg and /dev/null differ diff --git a/sound/attributions.txt b/sound/attributions.txt index 74058cb2dfa..49a808da159 100644 --- a/sound/attributions.txt +++ b/sound/attributions.txt @@ -60,10 +60,6 @@ https://freesound.org/people/ScottFerguson1/sounds/132846/ parry.ogg is taken from loudernoises "Sword Clash" which is licensed under CC Attributions 0, which is mixed with a genhit.ogg https://freesound.org/people/loudernoises/sounds/334169/ -local_forecast1.ogg to local_forecast8.ogg is "Local Forecast - Elevator" Kevin MacLeod (incompetech.com) -Licensed under Creative Commons: By Attribution 4.0 License -http://creativecommons.org/licenses/by/4.0/ - revolutionary_tide.ogg is adapted from several audio samples: