mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -107,9 +107,9 @@
|
||||
to_chat(user, "<span class='danger'>You cannot unwrench [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
@@ -325,9 +325,9 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
|
||||
welded = 1
|
||||
@@ -345,13 +345,15 @@
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!welded)
|
||||
if(open)
|
||||
to_chat(user, "<span class='notice'> Now closing the vent.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
to_chat(user, "<span class='notice'>Now closing the vent.</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
open = 0
|
||||
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
|
||||
else
|
||||
to_chat(user, "<span class='notice'> Now opening the vent.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
to_chat(user, "<span class='notice'>Now opening the vent.</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
open = 1
|
||||
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
|
||||
return
|
||||
|
||||
@@ -375,9 +375,9 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(get_turf(src), WT.usesound, 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the scrubber shut.", "You weld the vent scrubber.", "You hear welding.")
|
||||
welded = 1
|
||||
|
||||
Reference in New Issue
Block a user