From eb653a68c854262ece1c12b1d340e9c9de23f725 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 6 Jun 2016 10:32:57 -0400 Subject: [PATCH] Can Deconvert Mindslaves --- code/game/gamemodes/objective.dm | 1 + .../items/weapons/implants/implant_traitor.dm | 23 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 25b3727ec3a..5b6f3a35064 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -247,6 +247,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ return 1 return 0 +/datum/objective/protect/mindslave //subytpe for mindslave implants /datum/objective/hijack martyr_compatible = 0 //Technically you won't get both anyway. diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm index 547206da29c..3209661ad57 100644 --- a/code/game/objects/items/weapons/implants/implant_traitor.dm +++ b/code/game/objects/items/weapons/implants/implant_traitor.dm @@ -56,11 +56,11 @@ ticker.mode.traitors += H.mind H.mind.special_role = "traitor" to_chat(H, "You're now completely loyal to [user.name]! You now must lay down your life to protect them and assist in their goals at any cost.") - var/datum/objective/protect/p = new - p.owner = H.mind - p.target = user:mind - p.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]." - H.mind.objectives += p + var/datum/objective/protect/mindslave/MS = new + MS.owner = H.mind + MS.target = user:mind + MS.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]." + H.mind.objectives += MS for(var/datum/objective/objective in H.mind.objectives) to_chat(H, "Objective #1: [objective.explanation_text]") @@ -77,4 +77,15 @@ log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].") activated = 1 return 1 - return 0 \ No newline at end of file + return 0 + +/obj/item/weapon/implant/traitor/removed(mob/target) + if(..()) + ticker.mode.traitors -= target.mind + target.mind.special_role = null + ticker.mode.update_traitor_icons_removed(target.mind) + for(var/datum/objective/protect/mindslave/MS in target.mind.objectives) + target.mind.objectives -= MS + to_chat(target, "\red You are no longer a mindslave; you have complete and free control of your own faculties, once more!") + return 1 + return 0 \ No newline at end of file