Files
vgstation13/code/modules/tgui/states/hold_or_view.dm
ShiftyRail d79c1fe070 Byond 516 v2.0 (#37553)
* The TGS thing

* Revert the 516 revert

* Further segment the world/New() proc

* Fixes an issue here
2025-05-12 00:50:25 -05:00

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