Fixes ghosts being able to swap items in storage objects (#15256)

* Fixes ghosts being able to swap items in storage objs

* Use incapacitated()
This commit is contained in:
dearmochi
2021-01-07 12:14:09 +01:00
committed by GitHub
parent 52df4f1355
commit e331b28b08
+2 -2
View File
@@ -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)