Skip to content

Commit

Permalink
[MIRROR] Fixes an issue with strip menus making duplicate windows (#1515
Browse files Browse the repository at this point in the history
)

* 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 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 18, 2024
1 parent b57018a commit 71ab95c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71ab95c

Please sign in to comment.