From e331b28b083c1e0af94abb35eccf07ddd7eae11a Mon Sep 17 00:00:00 2001 From: dearmochi Date: Thu, 7 Jan 2021 12:14:09 +0100 Subject: [PATCH] Fixes ghosts being able to swap items in storage objects (#15256) * Fixes ghosts being able to swap items in storage objs * Use incapacitated() --- code/game/objects/items.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 0c2f5378926..5052874f5cc 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -645,10 +645,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect closeToolTip(usr) /obj/item/MouseDrop_T(obj/item/I, mob/user) - if(!user || src == I) + if(!user || user.incapacitated(ignore_lying = TRUE) || src == I) return - if(loc && I.loc == loc && istype(loc, /obj/item/storage)) // Are we trying to swap two items in the storage? + if(loc && I.loc == loc && istype(loc, /obj/item/storage) && loc.Adjacent(user)) // Are we trying to swap two items in the storage? var/obj/item/storage/S = loc S.swap_items(src, I, user)