Fixes Picking Up Items

This commit is contained in:
Fox-McCloud
2017-11-22 19:38:52 -05:00
parent aa9bbd877f
commit da1dcab8ea
+4 -8
View File
@@ -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, "<span class='warning'>You can't pick things up!</span>")
return
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
return
if(src.anchored) //Object isn't anchored
if(anchored) //Object isn't anchored
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
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, "<span class='warning'>Your left hand is full.</span>")
return
if(!istype(src.loc, /turf)) //Object is on a turf
if(!isturf(loc)) //Object is on a turf
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
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.