From 46c9ddb81c94709a8429e4d0385cb77577db618b Mon Sep 17 00:00:00 2001 From: kevinz000 Date: Thu, 12 Oct 2017 10:38:56 -0700 Subject: [PATCH 1/2] Adds tick check to ore boxes (#31396) * Update satchel_ore_boxdm.dm * Update satchel_ore_boxdm.dm * Update satchel_ore_boxdm.dm * Update satchel_ore_boxdm.dm * Update satchel_ore_boxdm.dm --- code/modules/mining/satchel_ore_boxdm.dm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 17c89b3af9..832d55a6a0 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -18,7 +18,7 @@ S.remove_from_storage(O, src) //This will move the item to this item's contents to_chat(user, "You empty the ore in [S] into \the [src].") else if(istype(W, /obj/item/crowbar)) - playsound(loc, W.usesound, 50, 1) + playsound(src, W.usesound, 50, 1) var/obj/item/crowbar/C = W if(do_after(user, 50*C.toolspeed, target = src)) user.visible_message("[user] pries \the [src] apart.", "You pry apart \the [src].", "You hear splitting wood.") @@ -51,8 +51,16 @@ user << browse(dat, "window=orebox") /obj/structure/ore_box/proc/dump_box_contents() - for(var/obj/item/ore/O in contents) - O.forceMove(loc) + var/drop = drop_location() + for(var/obj/item/ore/O in src) + if(QDELETED(O)) + continue + if(QDELETED(src)) + break + O.forceMove(drop) + if(TICK_CHECK) + stoplag() + drop = drop_location() /obj/structure/ore_box/Topic(href, href_list) if(..()) @@ -64,10 +72,9 @@ src.add_fingerprint(usr) if(href_list["removeall"]) dump_box_contents() - to_chat(usr, "You empty the box.") + to_chat(usr, "You open the release hatch on the box..") updateUsrDialog() - /obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user) var/obj/item/stack/sheet/mineral/wood/WD = new (loc, 4) if(user)