From 0cec83318f0bc522d1653814133a5a122e2409a9 Mon Sep 17 00:00:00 2001 From: Vladisvell Date: Sat, 9 Dec 2023 18:07:30 +0500 Subject: [PATCH 1/2] bugfix: storage-in-storage runtime fix --- code/game/objects/items/weapons/storage/storage.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 71d5e82b93e..b8d8b4bf489 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -158,6 +158,8 @@ /obj/item/storage/proc/show_to(mob/user) if(!user.client) return + if(!loc) //If for some reason storage was deleted + return if(user.s_active != src && !isobserver(user)) for(var/obj/item/I in src) // For bombs with mousetraps, facehuggers etc if(I.on_found(user)) From 0c0e1de52669805491d8cd35c26557176129d76d Mon Sep 17 00:00:00 2001 From: Vladisvell Date: Sat, 9 Dec 2023 20:37:16 +0500 Subject: [PATCH 2/2] show_to is now not being called, !loc -> qdeleted() --- code/game/objects/items/weapons/storage/storage.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index b8d8b4bf489..ce9e95495ac 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -158,7 +158,7 @@ /obj/item/storage/proc/show_to(mob/user) if(!user.client) return - if(!loc) //If for some reason storage was deleted + if(QDELETED(src)) return if(user.s_active != src && !isobserver(user)) for(var/obj/item/I in src) // For bombs with mousetraps, facehuggers etc @@ -468,7 +468,7 @@ if(usr) orient2hud(usr) - if(usr.s_active) + if(usr.s_active && !QDELETED(src)) usr.s_active.show_to(usr) if(W.maptext) W.maptext = ""