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)