mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 07:57:50 +00:00
* The TGS thing * Revert the 516 revert * Further segment the world/New() proc * Fixes an issue here
13 lines
377 B
Plaintext
13 lines
377 B
Plaintext
/**
|
|
* tgui state: view
|
|
*
|
|
* Checks if the object is in view or the mob is holding it, otherwise close the UI
|
|
*/
|
|
|
|
var/datum/ui_state/hold_or_view_state/hold_or_view_state = new
|
|
|
|
/datum/ui_state/hold_or_view_state/can_use_topic(src_object, mob/user)
|
|
if((user in viewers(user.client?.view, src_object)) || user.is_holding(src_object))
|
|
return UI_INTERACTIVE
|
|
return UI_CLOSE
|