Merge pull request #3568 from Giacom/rip_cyborg_inventory_bugs

Fixes #3565. Added a "put_in_hand_check" which returns 1 if the item can be equipped ...
This commit is contained in:
Alex
2014-05-06 20:07:49 +01:00
2 changed files with 12 additions and 5 deletions
+8 -4
View File
@@ -20,8 +20,8 @@
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(var/obj/item/W)
if(lying && !(W.flags&ABSTRACT)) return 0
if(!istype(W)) return 0
if(!put_in_hand_check(W))
return 0
if(!l_hand)
W.loc = src //TODO: move to equipped?
l_hand = W
@@ -37,8 +37,8 @@
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_r_hand(var/obj/item/W)
if(lying && !(W.flags&ABSTRACT)) return 0
if(!istype(W)) return 0
if(!put_in_hand_check(W))
return 0
if(!r_hand)
W.loc = src
r_hand = W
@@ -51,6 +51,10 @@
return 1
return 0
/mob/proc/put_in_hand_check(var/obj/item/W)
if(lying && !(W.flags&ABSTRACT)) return 0
if(!istype(W)) return 0
return 1
//Puts the item into our active hand if possible. returns 1 on success.
/mob/proc/put_in_active_hand(var/obj/item/W)
+4 -1
View File
@@ -298,4 +298,7 @@
now_pushing = 0
return
step(AM, t)
now_pushing = null
now_pushing = null
/mob/living/silicon/put_in_hand_check()
return 0