Alter playsound paradigm

This commit is contained in:
Aronai Sieyes
2020-05-19 11:03:23 -04:00
parent 7d5042cacd
commit ad75bb86bd
347 changed files with 1541 additions and 1543 deletions

View File

@@ -56,7 +56,7 @@
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
qdel(src)
@@ -196,7 +196,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(W.is_wrench() && !anchored)
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/stack/material/steel(get_turf(usr), 2)
@@ -207,7 +207,7 @@
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
playsound(src.loc, F.usesound, 50, 1)
playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>", "<span class='notice'>You repair some damage to \the [src].</span>")
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
@@ -216,7 +216,7 @@
// Install
if(W.is_screwdriver())
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fasten \the [src].</span>" )
playsound(loc, W.usesound, 75, 1)
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
anchored = !anchored
@@ -238,7 +238,7 @@
M.apply_damage(8,def_zone = "head")
take_damage(8)
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
else
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
return
@@ -253,7 +253,7 @@
return
else
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
take_damage(W.force)
user.setClickCooldown(user.get_attack_speed(W))