From 7f0e81c5bc015698462f4fdb1f6353ea59600641 Mon Sep 17 00:00:00 2001 From: "rockdtben@gmail.com" Date: Sun, 12 Aug 2012 16:09:08 +0000 Subject: [PATCH] Fixed issue 625 -Revheads cannot exploit loyalty implants anymore. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4381 316c924e-a436-60f5-8080-3fe189b3f50e --- .../objects/items/weapons/implants/implant.dm | 18 ++++++++++-------- .../items/weapons/implants/implantchair.dm | 9 +++++---- .../items/weapons/implants/implanter.dm | 9 +++++---- .../items/weapons/implants/implantfreedom.dm | 2 +- .../items/weapons/implants/implantnanoaug.dm | 4 ++-- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 62ca4797bc1..5e4955c37f4 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -10,9 +10,11 @@ proc/activate() return - + // What does the implant do upon injection? + // return 0 if the implant fails to persist (ex. Revhead and loyalty implant.) + // return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.) proc/implanted(source as mob) - return + return 1 proc/get_data() return @@ -28,7 +30,7 @@ implanted(source as mob) - return + return 1 get_data() @@ -54,7 +56,7 @@ activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." - return + return 1 trigger(emote, mob/source as mob) @@ -191,15 +193,15 @@ the implant may become unstable and either pre-maturely inject the subject or si implanted(M as mob) - if(!istype(M, /mob/living/carbon/human)) return + if(!istype(M, /mob/living/carbon/human)) return 0 var/mob/living/carbon/human/H = M if(H.mind in ticker.mode.head_revolutionaries) H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!") - return + return 0 else if(H.mind in ticker.mode:revolutionaries) ticker.mode:remove_revolutionary(H.mind) H << "\blue You feel a surge of loyalty towards Nanotrasen." - return + return 1 /obj/item/weapon/implant/adrenalin @@ -236,4 +238,4 @@ the implant may become unstable and either pre-maturely inject the subject or si implanted(mob/source as mob) source.mind.store_memory("A implant can be activated by using the pale emote, say *pale to attempt to activate.", 0, 0) source << "The implanted freedom implant can be activated by using the pale emote, say *pale to attempt to activate." - return + return 1 diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index 454da6b2ce3..215d591532c 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -133,10 +133,11 @@ if(istype(imp, /obj/item/weapon/implant/loyalty)) for (var/mob/O in viewers(M, null)) O.show_message("\red [M] has been implanted by the [src.name].", 1) - imp.loc = M - imp.imp_in = M - imp.implanted = 1 - imp.implanted(M) + + if(imp.implanted(M)) + imp.loc = M + imp.imp_in = M + imp.implanted = 1 implant_list -= imp break return diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index d350ab511d9..aed447472c2 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -36,10 +36,11 @@ log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") user.show_message("\red You implanted the implant into [M].") - src.imp.loc = M - src.imp.imp_in = M - src.imp.implanted = 1 - src.imp.implanted(M) + if(src.imp.implanted(M)) + src.imp.loc = M + src.imp.imp_in = M + src.imp.implanted = 1 + src.imp = null update() return diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm index 9b6f41698bd..557c43ac18b 100644 --- a/code/game/objects/items/weapons/implants/implantfreedom.dm +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -48,7 +48,7 @@ implanted(mob/source as mob) source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." - return + return 1 get_data() diff --git a/code/game/objects/items/weapons/implants/implantnanoaug.dm b/code/game/objects/items/weapons/implants/implantnanoaug.dm index 9306f4b4684..cbbde5949ea 100644 --- a/code/game/objects/items/weapons/implants/implantnanoaug.dm +++ b/code/game/objects/items/weapons/implants/implantnanoaug.dm @@ -20,7 +20,7 @@ implanted(mob/M as mob) - if(!istype(M, /mob/living/carbon/human)) return + if(!istype(M, /mob/living/carbon/human)) return 0 var/mob/living/carbon/human/H = M H.augmentations.Add(augmentation) // give them the mutation H << "\blue [augment_text]" @@ -39,7 +39,7 @@ spawn() H.start_radar() - return + return 1 /obj/item/weapon/implant/nanoaug/strength