[MIRROR] fix robot multibelts tgui usage (#11980)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-14 19:13:20 -05:00
committed by GitHub
co-authored by Kashargul
parent 9ae66b7e85
commit c50f4d228f
6 changed files with 14 additions and 10 deletions
+3 -2
View File
@@ -7,11 +7,12 @@
* tgui state: inventory_state
*
* Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory.
* Or part of a robotic toolbelt.
**/
GLOBAL_DATUM_INIT(tgui_inventory_state, /datum/tgui_state/inventory_state, new)
/datum/tgui_state/inventory_state/can_use_topic(src_object, mob/user)
if(!(src_object in user))
/datum/tgui_state/inventory_state/can_use_topic(atom/src_object, mob/user)
if(!(src_object in user) && !(isrobotmultibelt(src_object.loc)))
return STATUS_CLOSE
return user.shared_tgui_interaction(src_object)