Fixes admins not being able to open circuits from anywhere (#60775)

This commit is contained in:
Mothblocks
2021-08-09 06:56:37 -07:00
committed by GitHub
parent 83b21c041b
commit bc4f50cc3e
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
src.interface = interface
if(title)
src.title = title
src.state = src_object.ui_state()
src.state = src_object.ui_state(user)
// Deprecated
if(ui_x && ui_y)
src.window_size = list(ui_x, ui_y)
@@ -295,6 +295,10 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
/obj/item/integrated_circuit/ui_status(mob/user)
. = ..()
if (isobserver(user))
. = max(., UI_UPDATE)
// Extra protection because ui_state will not close the UI if they already have the ui open,
// as ui_state is only set during
if(admin_only)