From 2e3b3fb58d6aea9e5f155ac41f3d7d10a14a9b9a Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Mon, 28 Jul 2025 13:04:05 -0400 Subject: [PATCH] delay it (#18063) --- .../computers/modular_computer/core.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm index bca7f85fa7..d46be28ffe 100644 --- a/code/modules/modular_computers/computers/modular_computer/core.dm +++ b/code/modules/modular_computers/computers/modular_computer/core.dm @@ -133,10 +133,18 @@ active_program.kill_program(forced) active_program = null var/mob/user = usr - if(user && istype(user)) - tgui_interact(user) // Re-open the UI on this computer. It should show the main screen now. + addtimer(CALLBACK(src, PROC_REF(delayed_reopen_ui), user), 1, TIMER_DELETE_ME) update_icon() +/obj/item/modular_computer/proc/delayed_reopen_ui(var/mob/user) + // Re-open the UI on this computer. It should show the main screen now. + // Expected from kill_program() + PRIVATE_PROC(TRUE) + SHOULD_NOT_OVERRIDE(TRUE) + if(!user || !istype(user)) + return + tgui_interact(user) + // Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on) /obj/item/modular_computer/proc/get_ntnet_status(var/specific_action = 0) if(network_card)