mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -227,9 +227,9 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='notice'>[user] is disassembling \a [src].</span>", "<span class='notice'>You start disassembling \the [src].</span>")
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 50, target = src))
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
destroy()
|
||||
return
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The [src] was sliced apart by [user]!", 1, "\red You hear [src] coming apart.", 2)
|
||||
@@ -421,10 +421,10 @@
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.amount >= 2)
|
||||
to_chat(user, "<span class='notice'>You start to add the glass to \the [src].</span>")
|
||||
if(do_after(user, 10, target = src))
|
||||
if(do_after(user, 10 * G.toolspeed, target = src))
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the glass to \the [src].</span>")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(get_turf(src), G.usesound, 50, 1)
|
||||
new /obj/structure/table/glass(loc)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -433,9 +433,9 @@
|
||||
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct \the [src].</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
if(do_after(user, 10 * I.toolspeed, target = src))
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
@@ -495,15 +495,15 @@
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.status == 2)
|
||||
to_chat(user, "\blue Now weakening the reinforced table")
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50, target = src))
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue Table weakened")
|
||||
src.status = 1
|
||||
else
|
||||
to_chat(user, "\blue Now strengthening the reinforced table")
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50, target = src))
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue Table strengthened")
|
||||
src.status = 2
|
||||
@@ -586,7 +586,7 @@
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
|
||||
Reference in New Issue
Block a user