Files
CHOMPStation2/code/modules/tgui/states/observer.dm
Novacat df7cf338c2 Merge pull request #9741 from VOREStation/upstream-merge-7879
[MIRROR] ANOTHER Event manager TGUI fix
2021-02-18 15:18:44 +00:00

16 lines
384 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|R_EVENT, 0, src))
return STATUS_INTERACTIVE
return STATUS_CLOSE