mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +01:00
Refactors sound groups to use decls instead of a massive switch with dozens of global lists. (#9702)
This commit is contained in:
@@ -117,7 +117,7 @@ LINEN BINS
|
||||
if (do_after(user, 25, src))
|
||||
if(user.loc != loc)
|
||||
user.do_attack_animation(src)
|
||||
playsound(get_turf(loc), "rustle", 15, 1, -5)
|
||||
playsound(get_turf(loc), /decl/sound_category/rustle_sound, 15, 1, -5)
|
||||
var/folds = fold
|
||||
user.visible_message(SPAN_NOTICE("\The [user] [folds ? "unfolds" : "folds"] \the [src]."),
|
||||
SPAN_NOTICE("You [fold ? "unfold" : "fold"] \the [src]."))
|
||||
@@ -151,7 +151,7 @@ LINEN BINS
|
||||
if (do_after(user, 6, src))
|
||||
if(user.loc != loc)
|
||||
user.do_attack_animation(src)
|
||||
playsound(get_turf(loc), "rustle", 15, 1, -5)
|
||||
playsound(get_turf(loc), /decl/sound_category/rustle_sound, 15, 1, -5)
|
||||
var/rolls = roll
|
||||
user.visible_message(SPAN_NOTICE("\The [user] [rolls ? "unrolls" : "rolls"] \the [src]."),
|
||||
SPAN_NOTICE("You [roll ? "unroll" : "roll"] \the [src]."))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [blade]!", "You hear metal being sliced and sparks flying."))
|
||||
blade.spark_system.queue()
|
||||
playsound(loc, 'sound/weapons/blade.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
playsound(loc, /decl/sound_category/spark_sound, 50, 1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
return
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
spark(src, 5)
|
||||
playsound(loc, 'sound/weapons/blade.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
playsound(loc, /decl/sound_category/spark_sound, 50, 1)
|
||||
else if(W.iswelder())
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
add_overlay(emag)
|
||||
add_overlay(sparks)
|
||||
CUT_OVERLAY_IN(sparks, 6)
|
||||
playsound(loc, "sparks", 60, 1)
|
||||
playsound(loc, /decl/sound_category/spark_sound, 60, 1)
|
||||
locked = 0
|
||||
broken = 1
|
||||
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/material/shard( src.loc )
|
||||
playsound(src, "glass_break", 70, 1)
|
||||
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
|
||||
update_icon()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
if (S)
|
||||
if (S.get_amount() >= 1)
|
||||
if(material_name == "rglass")
|
||||
playsound(src.loc, "crowbar", 100, 1)
|
||||
playsound(src.loc, /decl/sound_category/crowbar_sound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(1))
|
||||
@@ -290,7 +290,7 @@
|
||||
to_chat(user, "You cannot make an airlock out of that material.")
|
||||
return
|
||||
if(S.get_amount() >= 2)
|
||||
playsound(src.loc, "crowbar", 100, 1)
|
||||
playsound(src.loc, /decl/sound_category/crowbar_sound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(2))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
shattered = 1
|
||||
unlocked = 1
|
||||
open = 1
|
||||
playsound(user, "glass_break", 100, 1)
|
||||
playsound(user, /decl/sound_category/glass_break_sound, 100, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/update_icon()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/structure/grille,
|
||||
/turf/unsimulated/mineral/asteroid
|
||||
)
|
||||
footstep_sound = "catwalk"
|
||||
footstep_sound = /decl/sound_category/catwalk_footstep
|
||||
|
||||
/obj/structure/lattice/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(shattered) return
|
||||
shattered = 1
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "glass_break", 70, 1)
|
||||
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
|
||||
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
playsound(loc, 'sound/effects/glass_hit.ogg', 100, 1)
|
||||
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
|
||||
visible_message(SPAN_DANGER("[src] looks like it's about to shatter!"))
|
||||
playsound(loc, "glasscrack", 100, 1)
|
||||
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
|
||||
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
|
||||
visible_message(SPAN_WARNING("[src] looks seriously damaged!"))
|
||||
playsound(loc, "glasscrack", 100, 1)
|
||||
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
|
||||
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
|
||||
visible_message(SPAN_WARNING("Cracks begin to appear in [src]!"))
|
||||
playsound(loc, "glasscrack", 100, 1)
|
||||
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
|
||||
return
|
||||
|
||||
/obj/structure/window/proc/apply_silicate(var/amount)
|
||||
@@ -87,7 +87,7 @@
|
||||
add_overlay(img)
|
||||
|
||||
/obj/structure/window/proc/shatter(var/display_message = 1)
|
||||
playsound(src, "glass_break", 70, 1)
|
||||
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
|
||||
if(display_message)
|
||||
visible_message(SPAN_WARNING("\The [src] shatters!"))
|
||||
if(dir == SOUTHWEST)
|
||||
|
||||
Reference in New Issue
Block a user