From 7f852fd71ba4b8dcd5d7e05fc019eb2db69f4d9b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 26 Aug 2023 04:38:37 +0200 Subject: [PATCH] [MIRROR] Zipping a duffle bag closes UI of all storage items opened inside it [MDB IGNORE] (#23325) * Zipping a duffle bag closes UI of all storage items opened inside it (#77886) ## About The Pull Request Fixes #77885 zipping it now looks for storage items inside its contents and closes their UI recursively, including its own UI as well. ## Changelog :cl: fix: zipping a duffle bag closes the UI of all storage items opened inside it /:cl: * Zipping a duffle bag closes UI of all storage items opened inside it --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> --- code/game/objects/items/storage/backpack.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index b989ab7d35f..63133a06be1 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -471,7 +471,8 @@ slowdown = initial(slowdown) atom_storage.locked = STORAGE_SOFT_LOCKED atom_storage.display_contents = FALSE - atom_storage.close_all() + for(var/obj/item/weapon as anything in get_all_contents_type(/obj/item)) //close ui of this and all items inside dufflebag + weapon.atom_storage?.close_all() //not everything has storage initialized else slowdown = zip_slowdown atom_storage.locked = STORAGE_NOT_LOCKED