Files
kiwistation/code/modules/nano/states/hands.dm
T
Bjorn Neergaard f214e547cb NanoUI Airlock Electronics
Also reworks a lot of the AE code.
2015-11-29 11:32:56 -06:00

20 lines
581 B
Plaintext

/**
* NanoUI State: hands_state
*
* Checks that the src_object is in the user's hands.
**/
/var/global/datum/topic_state/hands_state/hands_state = new()
/datum/topic_state/hands_state/can_use_topic(atom/movable/src_object, mob/user)
. = user.shared_nano_interaction(src_object)
if (. > NANO_CLOSE)
return min(., user.hands_can_use_topic(src_object))
/mob/proc/hands_can_use_topic(atom/movable/src_object)
return NANO_CLOSE
/mob/living/hands_can_use_topic(atom/movable/src_object)
if (src_object in get_both_hands(src))
return NANO_INTERACTIVE
return NANO_CLOSE