From dbec66f02ace90ae079ddca8063277a0cebf5132 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:29:32 +0100 Subject: [PATCH] [MIRROR] Fixes an issue with strip menus making duplicate windows (#26944) * Fixes an issue with strip menus making duplicate windows (#82055) ## About The Pull Request Fixes an oversight in #57889, where the strip_menus list is set, but never accessed, leading to whenever you drag to open the menu, it always opens a new window. ## Why It's Good For The Game Noticed this while porting the TGUI strip menu, and I figured I should fix it here too. From the design of the strippable element, it seems that this was the original design, but somehow got lost along the way. ## Changelog :cl: Fix: Opening a mob's strip menu multiple times will now properly update the window. /:cl: * Fixes an issue with strip menus making duplicate windows --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/datums/elements/strippable.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index e6f0d257ed7..36fcc7dcc96 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -51,7 +51,7 @@ if (!isnull(should_strip_proc_path) && !call(source, should_strip_proc_path)(user)) return - var/datum/strip_menu/strip_menu + var/datum/strip_menu/strip_menu = LAZYACCESS(strip_menus, source) if (isnull(strip_menu)) strip_menu = new(source, src)