mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 00:35:45 +01:00
[MIRROR] fix robot multibelts tgui usage (#11980)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
9ae66b7e85
commit
c50f4d228f
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user