fixes AI interacting with TGUI elements (#37625)

This commit is contained in:
ShiftyRail
2025-05-25 20:50:52 +01:00
committed by GitHub
parent 911b26111e
commit 9e760a450f
3 changed files with 3 additions and 4 deletions

View File

@@ -22,7 +22,6 @@
. = ..()
if(.)
return
tgui_interact(user)
/obj/machinery/computer/merch/tgui_interact(mob/user, datum/tgui/ui)

View File

@@ -75,14 +75,14 @@
// Disable UIs if the AI is unpowered.
if(aiRestorePowerRoutine)
return UI_DISABLED
return ..()
return UI_INTERACTIVE
/mob/living/silicon/robot/shared_ui_interaction(src_object)
// Disable UIs if the object isn't installed in the borg AND the borg is either locked, has a dead cell, or no cell.
var/atom/device = src_object
if((istype(device) && device.loc != src) && (!cell || cell.charge <= 0 || lockdown))
return UI_DISABLED
return ..()
return UI_INTERACTIVE
/**
* public

View File

@@ -42,7 +42,7 @@ var/datum/ui_state/default/default_state = new
return
// The AI can interact with anything it can see nearby, or with cameras while wireless control is enabled.
if(!control_disabled && can_see(src_object))
if(!control_disabled || can_see(src_object))
return UI_INTERACTIVE
return UI_CLOSE