Change machine frames and girders deconstruction step

They now use the screwdriver instead of the welding tool

On top of that I added a check to ensure you can't disassemble the same girder
more than once to farm materials
This commit is contained in:
oranges
2015-05-05 10:15:11 +12:00
parent e5f034fc0d
commit 4ac3497ebe
2 changed files with 23 additions and 27 deletions
+13 -13
View File
@@ -2,6 +2,7 @@
#define GIRDER_REINF_STRUTS 1
#define GIRDER_REINF 2
#define GIRDER_DISPLACED 3
#define GIRDER_DISASSEMBLED 4
/obj/structure/girder
name = "girder"
@@ -14,19 +15,18 @@
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob, params)
add_fingerprint(user)
if(istype(W, /obj/item/weapon/weldingtool) && state == GIRDER_DISPLACED)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
"<span class='notice'>You start to disassemble the girder...</span>", "You hear welding and clanking.")
if(do_after(user, 40, target = src))
if( !WT.isOn() )
return
user << "<span class='notice'>You disassemble the girder.</span>"
var/obj/item/stack/sheet/metal/M = new (loc, 2)
M.add_fingerprint(user)
qdel(src)
if(istype(W, /obj/item/weapon/screwdriver) && state == GIRDER_DISPLACED)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
if(do_after(user, 40, target = src))
if(state == GIRDER_DISASSEMBLED)
return
state = GIRDER_DISASSEMBLED
user << "<span class='notice'>You disassemble the girder.</span>"
var/obj/item/stack/sheet/metal/M = new (loc, 2)
M.add_fingerprint(user)
qdel(src)
else if(istype(W, /obj/item/weapon/wrench) && state == GIRDER_DISPLACED)
if (!istype(src.loc, /turf/simulated/floor))