Merge pull request #13125 from SteelSlayer/altclick-storage-fixes

Fixes some oversights with storage alt-clicking
This commit is contained in:
Fox McCloud
2020-03-15 13:57:13 -04:00
committed by GitHub
2 changed files with 11 additions and 3 deletions
@@ -83,13 +83,21 @@
to_chat(user, "You short out the lock on [src].")
return
/obj/item/storage/secure/AltClick(mob/user)
if(!try_to_open())
return FALSE
return ..()
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
if(!try_to_open())
return FALSE
return ..()
/obj/item/storage/secure/proc/try_to_open()
if(locked)
add_fingerprint(usr)
to_chat(usr, "<span class='warning'>It's locked!</span>")
return 0
..()
return FALSE
/obj/item/storage/secure/attack_self(mob/user as mob)
user.set_machine(src)
@@ -83,7 +83,7 @@
return
/obj/item/storage/AltClick(mob/user)
if(Adjacent(user))
if(Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
orient2hud(user)
if(user.s_active)
user.s_active.close(user)