[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
This commit is contained in:
spessbro
2021-01-07 17:24:57 -05:00
committed by GitHub
parent 0d60b4e458
commit a2a3d25dd4
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)