diff --git a/code/datums/mind.dm b/code/datums/mind.dm index de98b6e5808..a3c60066ef9 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1538,21 +1538,21 @@ var/list/implanters var/ref = "\ref[missionary.mind]" - if(!(missionary.mind in ticker.mode:implanter)) - ticker.mode:implanter[ref] = list() - implanters = ticker.mode:implanter[ref] + if(!(missionary.mind in ticker.mode.implanter)) + ticker.mode.implanter[ref] = list() + implanters = ticker.mode.implanter[ref] implanters.Add(src) ticker.mode.implanted.Add(src) ticker.mode.implanted[src] = missionary.mind - //ticker.mode:implanter[missionary.mind] += src - ticker.mode:implanter[ref] = implanters + //ticker.mode.implanter[missionary.mind] += src + ticker.mode.implanter[ref] = implanters ticker.mode.traitors += src special_role = "traitor" to_chat(current, "You're now a loyal zealot of [missionary.name]! You now must lay down your life to protect them and assist in their goals at any cost.") var/datum/objective/protect/mindslave/MS = new MS.owner = src - MS.target = missionary:mind - MS.explanation_text = "Obey every order from and protect [missionary:real_name], the [missionary:mind:assigned_role=="MODE" ? (missionary:mind:special_role) : (missionary:mind:assigned_role)]." + MS.target = missionary.mind + MS.explanation_text = "Obey every order from and protect [missionary.real_name], the [missionary.mind.assigned_role=="MODE" ? (missionary.mind.special_role) : (missionary.mind.assigned_role)]." objectives += MS for(var/datum/objective/objective in objectives) to_chat(current, "Objective #1: [objective.explanation_text]") diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 64088ddaa65..68c7727dc2b 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -471,7 +471,7 @@ if(robes) //delink on destruction robes.linked_staff = null robes = null - ..() + return ..() /obj/item/weapon/nullrod/missionary_staff/attack_self(mob/user) if(robes) //as long as it is linked, sec can't try to meta by stealing your staff and seeing if they get the link error message @@ -516,15 +516,14 @@ return if(missionary in viewers(target)) //missionary must maintain line of sight to target, but the target doesn't necessary need to be able to see the missionary do_convert(target, missionary) - return else to_chat(missionary, "You lost sight of the target before they could be converted!") faith -= 25 //they escaped, so you only lost a little faith (to prevent spamming) - return else //the do_after failed, probably because you moved or dropped the staff to_chat(missionary, "Your concentration was broken!") /obj/item/weapon/nullrod/missionary_staff/proc/do_convert(mob/living/carbon/human/target, mob/living/carbon/human/missionary) + var/convert_duration = 6000 //10 min if(!target || !istype(target) || !missionary || !istype(missionary)) return if(ismindslave(target) || target.mind.zealot_master) //mindslaves and zealots override the staff because the staff is just a temporary mindslave @@ -534,7 +533,8 @@ if(isloyal(target)) if(prob(20)) //loyalty implants typically overpower this, but you CAN get lucky and convert still (20% chance of success) faith -= 125 //yes, this puts it negative. it's gonna take longer to recharge if you manage to convert a one of these people to balance the new power you gained through them - to_chat(missionary, "Through sheer willpower, you overcome their closed mind and rally [target] to your cause! You may need a bit longer than usual before your faith is fully recharged...") + to_chat(missionary, "Through sheer willpower, you overcome their closed mind and rally [target] to your cause! You may need a bit longer than usual before your faith is fully recharged, and they won't remain loyal to you for long ...") + convert_duration = 3000 //5 min, because the loyalty implant will attempt to counteract the subversion else //80% chance to fail faith -= 75 to_chat(missionary, "Your faith is strong, but their mind remains closed to your ideals. Your resolve helps you retain a bit of faith though.") @@ -564,11 +564,21 @@ missionary.say("WOLOLO!") missionary << sound('sound/misc/wololo.ogg', 0, 1, 25) + var/obj/item/clothing/under/jumpsuit = null + if(target.w_uniform) - target.w_uniform.color = team_color + jumpsuit = target.w_uniform + jumpsuit.color = team_color target.update_inv_w_uniform(0,0) log_admin("[ckey(missionary.key)] has converted [ckey(target.key)] as a zealot.") - spawn(6000) //10 minutes of zealotry before you return to normal (there has to be a better way than this, but I can't think of one that doesn't involve a self-deleting implant/tumor off hand) - target.mind.remove_zealot() - log_admin("[ckey(target.key)] has deconverted and is no longer a zealot of [ckey(missionary.key)].") \ No newline at end of file + addtimer(src, "do_deconvert", convert_duration, FALSE, target, missionary, jumpsuit) //deconverts after the timer expires + +/obj/item/weapon/nullrod/missionary_staff/proc/do_deconvert(mob/living/carbon/human/target, mob/living/carbon/human/missionary, obj/item/clothing/under/jumpsuit) + if(!target || !istype(target)) //if we didn't supply a target (or a non-human target), stop here + return 0 + if(jumpsuit) + jumpsuit.color = initial(jumpsuit.color) + target.update_inv_w_uniform(0,0) + target.mind.remove_zealot() + log_admin("[ckey(target.key)] has deconverted and is no longer a zealot of [ckey(missionary.key)].") \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm index 78e63ddfae4..dbb4f1fb020 100644 --- a/code/game/objects/items/weapons/implants/implant_traitor.dm +++ b/code/game/objects/items/weapons/implants/implant_traitor.dm @@ -45,21 +45,21 @@ return -1 H.implanting = 1 to_chat(H, "You feel completely loyal to [user.name].") - if(!(user.mind in ticker.mode:implanter)) - ticker.mode:implanter[ref] = list() - implanters = ticker.mode:implanter[ref] + if(!(user.mind in ticker.mode.implanter)) + ticker.mode.implanter[ref] = list() + implanters = ticker.mode.implanter[ref] implanters.Add(H.mind) ticker.mode.implanted.Add(H.mind) ticker.mode.implanted[H.mind] = user.mind - //ticker.mode:implanter[user.mind] += H.mind - ticker.mode:implanter[ref] = implanters + //ticker.mode.implanter[user.mind] += H.mind + ticker.mode.implanter[ref] = implanters 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/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)]." + 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]") diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 27ae3c853e0..4573a176cba 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -889,12 +889,12 @@ if(linked_staff) //delink on destruction linked_staff.robes = null linked_staff = null - ..() + processing_objects -= src //probably is cleared in a parent call already, but just in case we're gonna do it here + return ..() /obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/equipped(mob/living/carbon/human/H, slot) if(!istype(H) || slot != slot_wear_suit) - if(src in processing_objects) - processing_objects -= src + processing_objects -= src return else processing_objects |= src @@ -903,12 +903,12 @@ if(!linked_staff) //if we don't have a linked staff, the rest of this is useless return - var/mob/living/carbon/human/H = loc - - if(!istype(H)) //if we somehow try to process while not on a human, remove ourselves from processing and return + if(!ishuman(loc)) //if we somehow try to process while not on a human, remove ourselves from processing and return processing_objects -= src return + var/mob/living/carbon/human/H = loc + if(linked_staff.faith >= 100) //if the linked staff is fully recharged, do nothing return @@ -919,5 +919,4 @@ linked_staff.faith += 5 if(linked_staff.faith >= 100) //if this charge puts the staff at or above full, notify the wearer - to_chat(H, "Faith renewed; ready to convert new followers.") - return \ No newline at end of file + to_chat(H, "Faith renewed; ready to convert new followers.") \ No newline at end of file