From 1b8471f7a48ae385142f366ad989fdf7549b5697 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Wed, 14 Feb 2018 10:32:12 -0600 Subject: [PATCH 1/2] Emag limits --- modular_citadel/code/game/objects/ids.dm | 31 +++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/modular_citadel/code/game/objects/ids.dm b/modular_citadel/code/game/objects/ids.dm index 63def730f1..68c40b34ec 100644 --- a/modular_citadel/code/game/objects/ids.dm +++ b/modular_citadel/code/game/objects/ids.dm @@ -43,4 +43,33 @@ /obj/item/card/id/knight/examine(mob/user) ..() - to_chat(user, "Alt-click to recolor it.") \ No newline at end of file + to_chat(user, "Alt-click to recolor it.") + +//================================================= + +/obj/item/card/emag_broken + desc = "It's a card with a melted magnetic strip, useless!" + name = "broken cryptographic sequencer" + icon_state = "emag" + item_state = "card-id" + lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' + flags_1 = NOBLUDGEON_1 + flags_2 = NO_MAT_REDEMPTION_2 + color = rgb(35, 20, 11) + +/obj/item/card/emag + var/uses = 10 + +/obj/item/card/emag/afterattack(atom/target, mob/user, proximity) + . = ..() + uses-- + + if(uses<1) + user.visible_message("[src] fizzles and sparks. it is now burned out.") + user.dropItemToGround(src) + var/obj/item/card/emag_broken/junk = new(user.loc) + junk.add_fingerprint(user) + qdel(src) + return + ..() \ No newline at end of file From 9c71763225fff1f59d1772f03aa0a78f094c839a Mon Sep 17 00:00:00 2001 From: Poojawa Date: Wed, 14 Feb 2018 10:44:29 -0600 Subject: [PATCH 2/2] fixes duplicate issues --- modular_citadel/code/game/objects/ids.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modular_citadel/code/game/objects/ids.dm b/modular_citadel/code/game/objects/ids.dm index 68c40b34ec..dc8f38bd25 100644 --- a/modular_citadel/code/game/objects/ids.dm +++ b/modular_citadel/code/game/objects/ids.dm @@ -66,10 +66,9 @@ uses-- if(uses<1) - user.visible_message("[src] fizzles and sparks. it is now burned out.") + user.visible_message("[src] fizzles and sparks. It's burned out!") user.dropItemToGround(src) var/obj/item/card/emag_broken/junk = new(user.loc) junk.add_fingerprint(user) qdel(src) - return - ..() \ No newline at end of file + return \ No newline at end of file