Adds calls to mob_can_unequip() where appropriate

This commit is contained in:
mwerezak
2015-04-25 13:55:24 -04:00
parent 3a00fce32b
commit 4829f1d82d
5 changed files with 45 additions and 41 deletions
+1 -5
View File
@@ -147,11 +147,8 @@
src.throwing = 0
if (src.loc == user)
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
if(!src.canremove)
if(!user.unEquip(src))
return
else
user.u_equip(src)
else
if(isliving(src.loc))
return
@@ -161,7 +158,6 @@
src.pickup(user)
return
/obj/item/attack_ai(mob/user as mob)
if (istype(src.loc, /obj/item/weapon/robot_module))
//If the item is part of a cyborg module, equip it
@@ -30,7 +30,7 @@
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
return
if(over_object == usr && Adjacent(usr)) // this must come before the screen objects only block
@@ -44,18 +44,21 @@
//there's got to be a better way of doing this.
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
if (!( usr.restrained() ) && !( usr.stat ))
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
if (( usr.restrained() ) || ( usr.stat ))
return
return
if ((src.loc == usr) && !usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/weapon/storage/proc/return_inv()