Files
Paradise/code/modules/tgui/states/physical.dm
T
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

25 lines
823 B
Plaintext

/**
* tgui state: physical_state
*
* Short-circuits the default state to only check physical distance.
**/
GLOBAL_DATUM_INIT(tgui_physical_state, /datum/tgui_state/physical, new)
/datum/tgui_state/physical/can_use_topic(src_object, mob/user)
. = user.shared_tgui_interaction(src_object)
if(. > STATUS_CLOSE)
return min(., user.physical_can_use_tgui_topic(src_object))
/mob/proc/physical_can_use_tgui_topic(src_object)
return STATUS_CLOSE
/mob/living/physical_can_use_tgui_topic(src_object)
return shared_living_tgui_distance(src_object)
/mob/living/silicon/physical_can_use_tgui_topic(src_object)
return max(STATUS_UPDATE, shared_living_tgui_distance(src_object)) // Silicons can always see.
/mob/living/silicon/ai/physical_can_use_tgui_topic(src_object)
return STATUS_UPDATE // AIs are not physical.