Merge pull request #7072 from Citadel-Station-13/upstream-merge-38376

[MIRROR] [s] Fix lockboxes not actually being locked
This commit is contained in:
LetterJay
2018-06-12 08:08:15 -05:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -697,7 +697,10 @@
if(A.loc == user)
. = COMPONENT_NO_ATTACK_HAND
show_to(user)
if(locked)
to_chat(user, "<span class='warning'>[parent] seems to be locked!</span>")
else
show_to(user)
/datum/component/storage/proc/signal_on_pickup(mob/user)
var/atom/A = parent
@@ -718,7 +721,7 @@
return hide_from(target)
/datum/component/storage/proc/on_alt_click(mob/user)
if(!isliving(user) || user.incapacitated() || !quickdraw || !user.CanReach(parent))
if(!isliving(user) || user.incapacitated() || !quickdraw || locked || !user.CanReach(parent))
return
var/obj/item/I = locate() in real_location()
if(!I)
@@ -19,6 +19,7 @@
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 14
STR.max_items = 4
STR.locked = TRUE
/obj/item/storage/lockbox/attackby(obj/item/W, mob/user, params)
var/locked = SendSignal(COMSIG_IS_STORAGE_LOCKED)