From fadf56b5fca0d6fbb0452d16e552433be60c3833 Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Sun, 25 May 2014 12:20:54 +1200 Subject: [PATCH] Ore box verb tweaks - Added more sanity checks - Added more user feedback --- code/modules/mining/satchel_ore_boxdm.dm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 886da095fa..a4b6378d4c 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -40,13 +40,16 @@ usr << "That's an [src]." usr << desc - if(!(src in view(1, usr))) //If you can't physically get to the ore box to open it, you can't see what's in it. + if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes. + return + + if(!Adjacent(usr)) //Can only check the contents of ore boxes if you can physically reach them. return add_fingerprint(usr) if(contents.len < 1) - usr << "It is empty" + usr << "It is empty." return if(world.time > last_update + 10) @@ -81,11 +84,19 @@ /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" set category = "Object" - set src in view(1) //You can only empty the box if you can physically reach it + set src in view(1) + + if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes. + usr << "\red You are physically incapable of emptying the ore box." + return if( usr.stat || usr.restrained() ) return + if(!Adjacent(usr)) //You can only empty the box if you can physically reach it + usr << "You cannot reach the ore box." + return + add_fingerprint(usr) if(contents.len < 1) @@ -99,6 +110,7 @@ return + // Updates ore tally /obj/structure/ore_box/proc/update_orecount() amt_iron = 0