Better pick up verb.

This commit is contained in:
Erthilo
2012-08-29 21:00:27 +01:00
parent 37fb62f606
commit d585e25227

View File

@@ -539,20 +539,35 @@
set category = "Object"
set name = "Pick up"
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr))
if(!(usr)) //BS12 EDIT
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "\red You can't pick things up!"
return
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "\red You can't pick things up!"
return
if(src.anchored) //Object isn't anchored
usr << "\red You can't pick that up!"
return
if(!usr.hand && usr.r_hand) //Right hand is not full
usr << "\red Your right hand is full."
return
if(usr.hand && usr.l_hand) //Left hand is not full
usr << "\red Your left hand is full."
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "\red You can't pick that up!"
return
//All checks are done, time to pick it up!
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
return
if(ishuman(usr))
if(usr.get_active_hand() == null)
src.Click() // Let me know if this has any problems -Giacom
/*
if(usr.get_active_hand() == null)
src.attack_hand(usr)
else
usr << "\red You already have something in your hand."
*/
else
usr << "\red This mob type can't use this verb."
//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi
//The default action is attack_self().