From babc31f94ea543f03f9713947c5e58effb23098a Mon Sep 17 00:00:00 2001 From: FenodyreeAv Date: Mon, 22 Jun 2026 18:35:34 +0100 Subject: [PATCH] Fixes HTML interfaces (R&D console) not updating when buttons on their UI are pressed (#22742) changes: - bugfix: "Fixes HTML interfaces not updating when a user hits a UI button." --- code/game/objects/objs.dm | 6 ++++++ html/changelogs/Fenodyree-FixHTML.yml | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 html/changelogs/Fenodyree-FixHTML.yml diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 34d0bb7cd27..3862dded453 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -223,11 +223,17 @@ if(M.client) if(SStgui.try_update_ui(M, src, ui)) is_in_use = 1 + else + if(M.machine == src) + src.attack_hand(M) //Needed for legacy HTML interfaces, not yet updated to TGUI. + if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) if(!(usr in nearby)) if(usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. is_in_use = 1 ui = SStgui.try_update_ui(usr, src, ui) + if(!ui) + src.attack_ai(usr) //Needed for legacy HTML interfaces, not yet updated to TGUI. in_use = is_in_use /obj/proc/updateDialog() diff --git a/html/changelogs/Fenodyree-FixHTML.yml b/html/changelogs/Fenodyree-FixHTML.yml new file mode 100644 index 00000000000..77219534f12 --- /dev/null +++ b/html/changelogs/Fenodyree-FixHTML.yml @@ -0,0 +1,5 @@ +author: Fenodyree + +delete-after: True +changes: + - bugfix: "Fixes HTML interfaces not updating when a user hits a UI button."