Merge pull request #8783 from Ghommie/Ghommie-cit98

Fixing some emergency pod storage refactor fuck ups.
This commit is contained in:
kevinz000
2019-07-03 13:42:49 -07:00
committed by GitHub
2 changed files with 21 additions and 6 deletions

View File

@@ -7,12 +7,28 @@
. = ..()
RegisterSignal(parent, COMSIG_ATOM_EMAG_ACT, .proc/unlock_me)
/datum/component/storage/concrete/emergency/on_attack_hand(datum/source, mob/user)
var/atom/A = parent
if(!attack_hand_interact)
return
if(user.active_storage == src && A.loc == user) //if you're already looking inside the storage item
user.active_storage.close(user)
close(user)
. = COMPONENT_NO_ATTACK_HAND
return
. = COMPONENT_NO_ATTACK_HAND
if(!check_locked(source, user, TRUE))
show_to(user)
A.do_jiggle()
if(rustle_sound)
playsound(A, "rustle", 50, 1, -5)
/datum/component/storage/concrete/emergency/signal_insertion_attempt(datum/source, obj/item/I, mob/M, silent = FALSE, force = FALSE)
if(!silent && istype(I, /obj/item/card/emag))
silent = TRUE // suppresses the message
return ..()
/datum/component/storage/concrete/check_locked(datum/source, mob/user, message = FALSE)
/datum/component/storage/concrete/emergency/check_locked(datum/source, mob/user, message = FALSE)
. = locked && GLOB.security_level < SEC_LEVEL_RED
if(message && . && user)
to_chat(user, "The storage unit will only unlock during a Red or Delta security alert.")

View File

@@ -531,11 +531,9 @@
if(!istype(M))
return FALSE
A.add_fingerprint(M)
if(locked && !force)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
if(!force && (check_locked(null, M) || !M.CanReach(parent, view_only = TRUE)))
return FALSE
if(force || M.CanReach(parent, view_only = TRUE))
show_to(M)
show_to(M)
/datum/component/storage/proc/mousedrop_receive(datum/source, atom/movable/O, mob/M)
if(isitem(O))
@@ -749,7 +747,8 @@
if(!quickdraw)
A.add_fingerprint(user)
user_show_to_mob(user)
playsound(A, "rustle", 50, 1, -5)
if(rustle_sound)
playsound(A, "rustle", 50, 1, -5)
return
if(!user.incapacitated())