mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-25 14:16:30 +01:00
Updates Tools
Adds toolspeed var, which is a multiplier on how 'fast' the tool works. 0.5 means it goes twice as fast. Adds usesound var, which determines what sound is used when a tool is being used. Changes a lot of code to use those two vars instead. Adds 'ayyy' tools, which are ported from /tg/'s abductor gamemode. They're currently admin only but I might make them obtainable by xenoarch later. Adds powertools, also from /tg/. CE starts with them in a new toolbelt that spawns in their locker, ported from (you guessed it) /tg/. Changes welder sprites to look nicer, ported yet again from /tg/. Modified the blue welder slightly so it can be the electric welder sprite. Adds various sounds from /tg/, for tools and welders.
This commit is contained in:
@@ -218,6 +218,7 @@
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
playsound(src, WT.usesound, 50)
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
|
||||
@@ -249,6 +250,7 @@
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
playsound(src, WT.usesound, 50)
|
||||
src.welded = !src.welded
|
||||
src.update_icon()
|
||||
for(var/mob/M in viewers(src))
|
||||
@@ -259,7 +261,8 @@
|
||||
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||
else
|
||||
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||
if(do_after(user, 20))
|
||||
playsound(src, W.usesound, 50)
|
||||
if(do_after(user, 20 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
|
||||
anchored = !anchored
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/weapon/weldingtool/experimental(src)
|
||||
new /obj/item/weapon/storage/belt/utility/chief/full(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||
else
|
||||
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||
if(do_after(user, 20))
|
||||
if(do_after(user, 20 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
|
||||
anchored = !anchored
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(rigged)
|
||||
user << "<span class='notice'>You cut away the wiring.</span>"
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
rigged = 0
|
||||
return
|
||||
else return attack_hand(user)
|
||||
|
||||
@@ -37,9 +37,8 @@
|
||||
|
||||
/obj/structure/curtain/attackby(obj/item/P, mob/user)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
user << "<span class='notice'>You start to cut the shower curtains.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
user << "<span class='notice'>You cut the shower curtains.</span>"
|
||||
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
|
||||
|
||||
@@ -167,10 +167,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, 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))
|
||||
if(do_after(user, 40 * WT.toolspeed))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
|
||||
var/M = text2path("/obj/item/stack/material/[glass]")
|
||||
@@ -178,14 +178,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))
|
||||
if(do_after(user, 40 * WT.toolspeed))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
|
||||
new /obj/item/stack/material/glass/reinforced(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))
|
||||
if(do_after(user, 40 * WT.toolspeed))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
|
||||
new /obj/item/stack/material/steel(src.loc, 4)
|
||||
@@ -195,13 +195,13 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
|
||||
else
|
||||
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
|
||||
anchored = !anchored
|
||||
@@ -218,17 +218,17 @@
|
||||
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src, 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))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
@@ -246,10 +246,10 @@
|
||||
src.state = 1
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
|
||||
src.state = 1
|
||||
@@ -282,10 +282,10 @@
|
||||
glass = material_name
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
|
||||
var/path
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
C.set_dir(dir)
|
||||
part.loc = loc
|
||||
part.master = null
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
if(!has_extinguisher)
|
||||
user << "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 15))
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
if(do_after(user, 15 * O.toolspeed))
|
||||
user << "<span class='notice'>You unwrench the extinguisher cabinet.</span>"
|
||||
new /obj/item/frame/extinguisher_cabinet( src.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -56,22 +56,22 @@
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
if(anchored && !reinf_material)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now disassembling the girder...</span>"
|
||||
if(do_after(user,40))
|
||||
if(do_after(user,40 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You dissasembled the girder!</span>"
|
||||
dismantle()
|
||||
else if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now securing the girder...</span>"
|
||||
if(do_after(user, 40,src))
|
||||
if(do_after(user, 40 * W.toolspeed, src))
|
||||
user << "<span class='notice'>You secured the girder!</span>"
|
||||
reset_girder()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "<span class='notice'>Now slicing apart the girder...</span>"
|
||||
if(do_after(user,30))
|
||||
if(do_after(user,30 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You slice apart the girder!</span>"
|
||||
dismantle()
|
||||
@@ -82,21 +82,21 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(state == 2)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now unsecuring support struts...</span>"
|
||||
if(do_after(user,40))
|
||||
if(do_after(user,40 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You unsecured the support struts!</span>"
|
||||
state = 1
|
||||
else if(anchored && !reinf_material)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
reinforcing = !reinforcing
|
||||
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now removing support struts...</span>"
|
||||
if(do_after(user,40))
|
||||
if(do_after(user,40 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You removed the support struts!</span>"
|
||||
reinf_material.place_dismantled_product(get_turf(src))
|
||||
@@ -104,9 +104,9 @@
|
||||
reset_girder()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now dislodging the girder...</span>"
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You dislodged the girder!</span>"
|
||||
icon_state = "displaced"
|
||||
@@ -233,15 +233,15 @@
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user << "<span class='notice'>Now disassembling the girder...</span>"
|
||||
if(do_after(user,40))
|
||||
if(do_after(user,40 * W.toolspeed))
|
||||
user << "<span class='notice'>You dissasembled the girder!</span>"
|
||||
dismantle()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "<span class='notice'>Now slicing apart the girder...</span>"
|
||||
if(do_after(user,30))
|
||||
if(do_after(user,30 * W.toolspeed))
|
||||
user << "<span class='notice'>You slice apart the girder!</span>"
|
||||
dismantle()
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.get_structure_damage()
|
||||
var/passthrough = 0
|
||||
|
||||
|
||||
if(!damage) return
|
||||
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
@@ -96,12 +96,12 @@
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
|
||||
qdel(src)
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
|
||||
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
if(!glass)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20 * I.toolspeed))
|
||||
user << "<span class='notice'>You unfasten the frame.</span>"
|
||||
new /obj/item/frame/mirror( src.loc )
|
||||
qdel(src)
|
||||
@@ -65,7 +65,7 @@
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
return
|
||||
if(!shattered && glass)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user << "<span class='notice'>You remove the glass.</span>"
|
||||
glass = !glass
|
||||
icon_state = "mirror_frame"
|
||||
|
||||
@@ -414,18 +414,18 @@
|
||||
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40))
|
||||
if (do_after(user, 40 * O.toolspeed))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 0
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
user << "<span class='notice'>You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20))
|
||||
if (do_after(user, 20 * O.toolspeed))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start to unwrench the noticeboard.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 15))
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
if(do_after(user, 15 * O.toolspeed))
|
||||
user << "<span class='notice'>You unwrench the noticeboard.</span>"
|
||||
new /obj/item/frame/noticeboard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
@@ -123,7 +123,7 @@
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
user << "You remove the padding from \the [src]."
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
remove_padding()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
|
||||
@@ -109,7 +109,7 @@ var/global/list/stool_cache = list() //haha stool
|
||||
|
||||
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
@@ -143,7 +143,7 @@ var/global/list/stool_cache = list() //haha stool
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
user << "You remove the padding from \the [src]."
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
remove_padding()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
|
||||
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 50 * I.toolspeed))
|
||||
watertemp = newtemp
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -93,9 +93,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * WT.toolspeed))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
|
||||
if(secure)
|
||||
@@ -109,10 +109,10 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/weapon/wrench) && !anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
|
||||
src.anchored = 1
|
||||
@@ -120,10 +120,10 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
|
||||
src.anchored = 0
|
||||
@@ -146,10 +146,10 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/weapon/wirecutters) && !src.electronics)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(src, 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))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src) return
|
||||
|
||||
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
|
||||
@@ -175,10 +175,10 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && src.electronics)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(!src || !src.electronics) return
|
||||
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
|
||||
step = 1
|
||||
@@ -195,10 +195,10 @@ obj/structure/windoor_assembly/Destroy()
|
||||
to_chat(usr,"<span class='warning'>The assembly has broken airlock electronics.</span>")
|
||||
return
|
||||
to_chat(usr,browse(null, "window=windoor_access")) //Not sure what this actually does... -Ner
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
|
||||
if(!src) return
|
||||
|
||||
|
||||
@@ -242,29 +242,29 @@
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
update_nearby_icons()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
update_verbs()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
update_verbs()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
|
||||
state = 1 - state
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
|
||||
else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf))
|
||||
if(!glasstype)
|
||||
user << "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>"
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
|
||||
if(dir == SOUTHWEST)
|
||||
var/obj/item/stack/material/mats = new glasstype(loc)
|
||||
|
||||
Reference in New Issue
Block a user