Files
Paradise/code/modules/tgui/states/notcontained.dm
AffectedArc07 58aa86cb9f TGUI-V3 (#13310)
* I need that gitignore file

* Temp Commit - DOES NOT COMPILE

* THE SHIT WORKS

* Readme change

* Disposal Unit --> TGUI

* mmmm yes CI which may not actually work

* New GitIgnore

* ITS TGUI-NEXT BABY

* Doc update

* CI tweak

* Chmod

* And again

* *sigh*

* Lets appreciate the irony of me failing CI stages

* 0/1 --> True/False

* Fixes some update nonsense

* CI Update

* Lets try this

* What about this maybe

* NVM is hurting me

* I swear to god

* A little bit of validation in my life

* V3 BABYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

* Fixes

* Fixes NaN appearing for a few frames when UIs open

* Fixes + Crew Monitor

* Corn + Steel + Mochi Fixes

* Forgot this

* Fixes from stylemistake

* Code Change

* Adds logout proc

* Offline implications + Resizeable crew monitor

* Change locate() to locateUID()

* Change div --> box
2020-06-30 03:51:36 -04:00

27 lines
1005 B
Plaintext

/**
* tgui state: notcontained_state
*
* Checks that the user is not inside src_object, and then makes the default checks.
**/
GLOBAL_DATUM_INIT(tgui_notcontained_state, /datum/tgui_state/notcontained_state, new)
/datum/tgui_state/notcontained_state/can_use_topic(atom/src_object, mob/user)
. = user.shared_tgui_interaction(src_object)
if(. > STATUS_CLOSE)
return min(., user.notcontained_can_use_tgui_topic(src_object))
/mob/proc/notcontained_can_use_tgui_topic(src_object)
return STATUS_CLOSE
/mob/living/notcontained_can_use_tgui_topic(atom/src_object)
if(src_object.contains(src))
return STATUS_CLOSE // Close if we're inside it.
return default_can_use_tgui_topic(src_object)
/mob/living/silicon/notcontained_can_use_tgui_topic(src_object)
return default_can_use_tgui_topic(src_object) // Silicons use default bevhavior.
/mob/living/simple_animal/drone/notcontained_can_use_tgui_topic(src_object)
return default_can_use_tgui_topic(src_object) // Drones use default bevhavior.