Of Helper Procs & Dumbs

Makes a mob/proc/can_use_hand(), which determines whether or not a mob can use a given hand.

Redefined in human.dm to check a hand's status and usability.
This commit is contained in:
skull132
2016-03-25 20:33:10 +02:00
parent 4bce434a56
commit 17938853d5
9 changed files with 32 additions and 59 deletions
+2 -8
View File
@@ -31,14 +31,8 @@
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user))
return
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return
if (!user.can_use_hand())
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
+2 -8
View File
@@ -346,14 +346,8 @@
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/user as mob)
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return
if (!user.can_use_hand())
return
if(isrobot(user) || isAI(user))
return