mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -166,10 +166,10 @@
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(istext(glass))
|
||||
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue You welded the [glass] plating off!")
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
|
||||
@@ -177,14 +177,14 @@
|
||||
glass = 0
|
||||
else if(glass == 1)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue You welded the glass panel out!")
|
||||
new /obj/item/stack/sheet/rglass(src.loc)
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue You dissasembled the airlock assembly!")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
@@ -194,13 +194,13 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
else
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You [anchored? "un" : ""]secured the airlock assembly!")
|
||||
anchored = !anchored
|
||||
@@ -208,29 +208,29 @@
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * coil.toolspeed, target = src))
|
||||
if(!src) return
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
to_chat(user, "\blue You wire the Airlock!")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You cut the airlock wires.!")
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You installed the airlock electronics!")
|
||||
src.state = 2
|
||||
@@ -240,10 +240,10 @@
|
||||
W.loc = src.loc
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You removed the airlock electronics!")
|
||||
src.state = 1
|
||||
@@ -261,27 +261,27 @@
|
||||
if(S)
|
||||
if(S.amount>=1)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src.loc, S.usesound, 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, target = src))
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
to_chat(user, "\blue You installed reinforced glass windows into the airlock assembly!")
|
||||
S.use(1)
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src.loc, S.usesound, 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, target = src))
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
to_chat(user, "\blue You installed [M] plating into the airlock assembly!")
|
||||
S.use(2)
|
||||
glass = "[M]"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "\blue Now finishing the airlock.")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You finish the airlock!")
|
||||
var/path
|
||||
|
||||
Reference in New Issue
Block a user