Files
CHOMPStation2/code/modules/tgui/states/observer.dm
ShadowLarkens 1cded01770 TGUI v3.0
This ports TGUI, and makes the old nano crew monitor and the disposal
bins use it as first examples.
2020-07-16 14:59:45 -07:00

16 lines
376 B
Plaintext

/**
* tgui state: observer_state
*
* Checks that the user is an observer/ghost.
**/
GLOBAL_DATUM_INIT(tgui_observer_state, /datum/tgui_state/observer_state, new)
/datum/tgui_state/observer_state/can_use_topic(src_object, mob/user)
if(isobserver(user))
return STATUS_INTERACTIVE
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE
return STATUS_CLOSE