mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user