Refactors sound groups to use decls instead of a massive switch with dozens of global lists. (#9702)

This commit is contained in:
Matt Atlas
2020-08-28 20:47:00 +02:00
committed by GitHub
parent db1b0cece0
commit 0dd08df5b2
125 changed files with 629 additions and 557 deletions
+2 -2
View File
@@ -156,13 +156,13 @@
insert_sheet_at(usr, page+1, in_hand)
else if(page != pages.len)
page++
playsound(src.loc, "pageturn", 50, 1)
playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
if(href_list["prev_page"])
if(in_hand && (istype(in_hand, /obj/item/paper) || istype(in_hand, /obj/item/photo)))
insert_sheet_at(usr, page, in_hand)
else if(page > 1)
page--
playsound(src.loc, "pageturn", 50, 1)
playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
if(href_list["remove"])
var/obj/item/W = pages[page]
usr.put_in_hands(W)
+1 -1
View File
@@ -106,7 +106,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
if(toner <= 10) //allow replacing when low toner is affecting the print darkness
to_chat(user, SPAN_NOTICE("You insert \the [O] into \the [src]."))
flick("photocopier_toner", src)
playsound(loc, "switchsounds", 50, 1)
playsound(loc, /decl/sound_category/switch_sound, 50, 1)
var/obj/item/device/toner/T = O
toner += T.toner_amount
user.drop_from_inventory(O,get_turf(src))
+1 -1
View File
@@ -96,7 +96,7 @@ var/global/photo_count = 0
var/mob/M = usr
if(!( istype(over_object, /obj/screen) ))
return ..()
playsound(loc, "rustle", 50, 1, -5)
playsound(loc, /decl/sound_category/rustle_sound, 50, 1, -5)
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if(BP_R_HAND)