From cdeaeac44cbc6d3caddbf7c69cf8cb855b8a421a Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 12 Jan 2022 16:16:02 +0100 Subject: [PATCH] [MIRROR] Fixes opening storage containers in a locker (or other container) via right click. [MDB IGNORE] (#10579) * Fixes opening storage containers in a locker (or other container) via right click. (#63955) * fix * cleanup * review * Fixes opening storage containers in a locker (or other container) via right click. Co-authored-by: Seth Scherer --- code/datums/components/storage/storage.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 34a297bb506..aa5aea20b7e 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -871,7 +871,10 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) /datum/component/storage/proc/open_storage(mob/user) - if(!isliving(user) || !user.CanReach(parent) || user.incapacitated()) + if(!user.CanReach(parent)) + user.balloon_alert(user, "can't reach!") + return FALSE + if(!isliving(user) || user.incapacitated()) return FALSE if(locked) to_chat(user, span_warning("[parent] seems to be locked!")) @@ -897,6 +900,8 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) if(open_storage(user)) return COMPONENT_CANCEL_ATTACK_CHAIN + if(LAZYACCESS(modifiers, RIGHT_CLICK)) + return COMPONENT_SECONDARY_CANCEL_ATTACK_CHAIN /datum/component/storage/proc/on_open_storage_attackby(datum/source, obj/item/weapon, mob/user, params) SIGNAL_HANDLER