From da1dcab8ea3cd4cc39c8f4a9d0a47a1db980277e Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 22 Nov 2017 19:38:52 -0500 Subject: [PATCH] Fixes Picking Up Items --- code/game/objects/items.dm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d40baf16877..6764f192e69 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -377,15 +377,12 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(!(usr)) //BS12 EDIT return - if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) + if(usr.incapacitated() || !Adjacent(usr)) return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain + if(!iscarbon(usr) || isbrain(usr)) //Is humanoid, and is not a brain to_chat(usr, "You can't pick things up!") return - if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained - to_chat(usr, "You can't pick things up!") - return - if(src.anchored) //Object isn't anchored + if(anchored) //Object isn't anchored to_chat(usr, "You can't pick that up!") return if(!usr.hand && usr.r_hand) //Right hand is not full @@ -394,12 +391,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(usr.hand && usr.l_hand) //Left hand is not full to_chat(usr, "Your left hand is full.") return - if(!istype(src.loc, /turf)) //Object is on a turf + if(!isturf(loc)) //Object is on a turf to_chat(usr, "You can't pick that up!") return //All checks are done, time to pick it up! usr.UnarmedAttack(src) - return //This proc is executed when someone clicks the on-screen UI button.