From e45aec98e7b08b71ff3709ff7620fe03afee2e9a Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sat, 18 Aug 2012 01:44:00 +0000 Subject: [PATCH] - Fixed ore boxes not being properly loaded from mining satchels. - Fixed it being possible to drag-drop any storage item to either hand from.. anywhere... You can now only do that if the backpack is somewhere on you. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4485 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/storage/backpack.dm | 4 +++- code/modules/mining/satchel_ore_boxdm.dm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/game/objects/storage/backpack.dm b/code/game/objects/storage/backpack.dm index 50742cb7df..94a9642ac9 100644 --- a/code/game/objects/storage/backpack.dm +++ b/code/game/objects/storage/backpack.dm @@ -3,8 +3,10 @@ var/mob/M = usr if (!( istype(over_object, /obj/screen) )) return ..() + if (!(src.loc == usr) || (src.loc && src.loc.loc == usr)) + return playsound(src.loc, "rustle", 50, 1, -5) - if ((!( M.restrained() ) && !( M.stat )) + if (!( M.restrained() ) && !( M.stat )) switch(over_object.name) if("r_hand") M.u_equip(src) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index a76db70f2b..33f15be55d 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -13,8 +13,9 @@ src.contents += W; if (istype(W, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = W + S.hide_from(usr) for(var/obj/item/weapon/ore/O in S.contents) - S.remove_from_storage(W,src) //This will move the item to this item's contents + S.remove_from_storage(O, src) //This will move the item to this item's contents user << "\blue You empty the satchel into the box." return