[MIRROR] [Performance] Refactors ambient sounds to use global lists instead of list macros (#2548)

* [Performance] Refactors ambient sounds to use global lists instead of list macros  (#55988)

What it says on the tin really. If we want to be precise it changes how ambient sounds by giving areas an index define and then checks if they don't have a custom ambient sounds list if they don't then it applies the correct global list to ambientsounds

* [Performance] Refactors ambient sounds to use global lists instead of list macros

Co-authored-by: spessbro <51048066+spessbro@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-01-07 23:41:56 +01:00
committed by GitHub
co-authored by spessbro
parent 608dccb408
commit 01207d06f7
13 changed files with 158 additions and 97 deletions
+1 -1
View File
@@ -1024,7 +1024,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
target.playsound_local(source, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1)
if("creepy")
//These sounds are (mostly) taken from Hidden: Source
target.playsound_local(source, pick(CREEPY_SOUNDS), 50, 1)
target.playsound_local(source, pick(GLOB.creepy_ambience), 50, 1)
if("tesla") //Tesla loose!
target.playsound_local(source, 'sound/magic/lightningbolt.ogg', 35, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, source, 'sound/magic/lightningbolt.ogg', 65, 1), 30)