Files
Bubberstation/code/modules/tgui/states/hands.dm
Jack Edge 1c92b17e3d Fixes some last minute spraycan bugs
- Cyborgs can now use their spraycans
- Spraycans are different colours
2016-05-23 20:26:40 +01:00

26 lines
650 B
Plaintext

/**
* tgui state: hands_state
*
* Checks that the src_object is in the user's hands.
**/
/var/global/datum/ui_state/hands_state/hands_state = new()
/datum/ui_state/hands_state/can_use_topic(src_object, mob/user)
. = user.shared_ui_interaction(src_object)
if(. > UI_CLOSE)
return min(., user.hands_can_use_topic(src_object))
/mob/proc/hands_can_use_topic(src_object)
return UI_CLOSE
/mob/living/hands_can_use_topic(src_object)
if(src_object in get_both_hands(src))
return UI_INTERACTIVE
return UI_CLOSE
/mob/living/silicon/robot/hands_can_use_topic(src_object)
if(activated(src_object))
return UI_INTERACTIVE
return UI_CLOSE