From 1f0690ca0233bd1cecb781c3f71ba811ba700b83 Mon Sep 17 00:00:00 2001 From: Zuvassin Date: Fri, 29 Apr 2016 03:23:51 +1000 Subject: [PATCH] Fixes issues with survival pod GPS and Fans not able to be deconstructed --- code/modules/mining/mine_items.dm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 624556ef39e..0619d722f44 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -428,6 +428,16 @@ density = 1 pixel_y = -32 +/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message("[user] disassembles the gps.", \ + "You start to disassemble the gps...", "You hear clanking and banging noises.") + if(do_after(user, 20/W.toolspeed, target = src)) + new /obj/item/device/gps(src.loc) + qdel(src) + return ..() + /obj/item/device/gps/computer/attack_hand(mob/user) attack_self(user) @@ -474,6 +484,22 @@ anchored = 1 density = 1 var/arbitraryatmosblockingvar = TRUE + var/buildstacktype = /obj/item/stack/sheet/metal + var/buildstackamount = 5 + +/obj/structure/fans/deconstruct() + if(buildstacktype) + new buildstacktype(loc,buildstackamount) + ..() + +/obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message("[user] disassembles the fan.", \ + "You start to disassemble the fan...", "You hear clanking and banging noises.") + if(do_after(user, 20/W.toolspeed, target = src)) + deconstruct() + return ..() /obj/structure/fans/tiny name = "tiny fan" @@ -481,6 +507,7 @@ layer = TURF_LAYER + 0.8 density = 0 icon_state = "fan_tiny" + buildstackamount = 2 /obj/structure/fans/New(loc) ..()