Merge pull request #22020 from Supermichael777/Auto

Makes prying up conveyors take time and visible to others
This commit is contained in:
oranges
2016-12-10 11:07:48 +13:00
committed by GitHub
+11 -6
View File
@@ -116,12 +116,17 @@
// attack with item, place item on conveyor
/obj/machinery/conveyor/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/crowbar))
if(!(stat & BROKEN))
var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc)
C.id = id
transfer_fingerprints_to(C)
user << "<span class='notice'>You remove the conveyor belt.</span>"
qdel(src)
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
if(do_after(user, 40/I.toolspeed, target = src))
if(qdeleted(src))
return //prevent multiple decontructs
if(!(stat & BROKEN))
var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc)
C.id = id
transfer_fingerprints_to(C)
user << "<span class='notice'>You remove the conveyor belt.</span>"
qdel(src)
else if(istype(I, /obj/item/weapon/wrench))
if(!(stat & BROKEN))