mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 15:42:28 +00:00
* Drone UI V1 * Bigger button And admin log clarification * Review 1 Also commented out the drone 'rebooting' action, since it didn't work. * Spacing Seemed a bit too cluttered. * Review 2 Co-Authored-By: dearmochi <shenesis@gmail.com> Co-authored-by: dearmochi <shenesis@gmail.com>
24 lines
802 B
Plaintext
24 lines
802 B
Plaintext
/**
|
|
* tgui state: notcontained_state
|
|
*
|
|
* Checks that the user is not inside src_object, and then makes the default checks.
|
|
*/
|
|
|
|
GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new)
|
|
|
|
/datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user)
|
|
. = user.shared_ui_interaction(src_object)
|
|
if(. > STATUS_CLOSE)
|
|
return min(., user.notcontained_can_use_topic(src_object))
|
|
|
|
/mob/proc/notcontained_can_use_topic(src_object)
|
|
return STATUS_CLOSE
|
|
|
|
/mob/living/notcontained_can_use_topic(atom/src_object)
|
|
if(src_object.contains(src))
|
|
return STATUS_CLOSE // Close if we're inside it.
|
|
return default_can_use_topic(src_object)
|
|
|
|
/mob/living/silicon/notcontained_can_use_topic(src_object)
|
|
return default_can_use_topic(src_object) // Silicons use default bevhavior.
|