Make guillotines deconstructable

This commit is contained in:
datlo
2018-11-25 00:26:54 +00:00
parent 22fc37d646
commit c22f2909c7
@@ -194,6 +194,28 @@
return TRUE
else
current_action = 0
if(iswelder(W))
var/obj/item/weldingtool/WT = W
if(!WT.remove_fuel(0, user))
return
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 150 * WT.toolspeed, 1, target = src))
if(!WT.isOn())
return
playsound(loc, WT.usesound, 50, 1)
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
var/turf/T = get_turf(src)
if (blade_sharpness == GUILLOTINE_BLADE_MAX_SHARP)
new /obj/item/stack/sheet/plasteel(T, 3)
else
new /obj/item/stack/sheet/plasteel(T, 2) //prevents reconstructing to sharpen the guillotine without additional plasteel
new /obj/item/stack/sheet/wood(T, 20)
new /obj/item/stack/cable_coil(T, 10)
qdel(src)
return
else
return ..()