mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
fixes AI interacting with TGUI elements (#37625)
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/computer/merch/tgui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user