From 8c410b92a7da5bb69a68e13243dc249c26cd4938 Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sat, 30 Jun 2018 04:21:03 -0400 Subject: [PATCH 1/2] Fixes TGUI runtime (#38797) ui_interact was being called on usr instead of M --- code/game/objects/objs.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 664cdbf383..7c2468c28f 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -27,7 +27,7 @@ var/req_access_txt = "0" var/list/req_one_access var/req_one_access_txt = "0" - + var/renamedByPlayer = FALSE //set when a player uses a pen on a renamable object /obj/vv_edit_var(vname, vval) @@ -112,16 +112,16 @@ /obj/proc/updateUsrDialog() if((obj_flags & IN_USE) && !(obj_flags & USES_TGUI)) - var/is_in_use = 0 + var/is_in_use = FALSE var/list/nearby = viewers(1, src) for(var/mob/M in nearby) if ((M.client && M.machine == src)) - is_in_use = 1 - ui_interact(usr) + is_in_use = TRUE + ui_interact(M) if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr)) 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 + is_in_use = TRUE ui_interact(usr) // check for TK users @@ -131,7 +131,7 @@ if(!(usr in nearby)) if(usr.client && usr.machine==src) if(H.dna.check_mutation(TK)) - is_in_use = 1 + is_in_use = TRUE ui_interact(usr) if (is_in_use) obj_flags |= IN_USE