Merge pull request #8537 from Ghommie/Ghommie-cit28

Fixes emags wasting charges on un-emaggable stuff.
This commit is contained in:
BlackMajor
2019-08-28 13:54:03 +12:00
committed by GitHub
79 changed files with 1824 additions and 1687 deletions
+10 -8
View File
@@ -48,14 +48,16 @@
to_chat(user, "<span class='danger'>It's locked!</span>")
/obj/item/storage/lockbox/emag_act(mob/user)
if(!broken)
broken = TRUE
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
desc += "It appears to be broken."
icon_state = src.icon_broken
if(user)
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
return
. = ..()
if(broken)
return
broken = TRUE
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
desc += "It appears to be broken."
icon_state = src.icon_broken
if(user)
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
return TRUE
/obj/item/storage/lockbox/Entered()
. = ..()