mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
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:
@@ -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>"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user