From 637273285dddb2493c4b7b53df7c4e1c0ba099b2 Mon Sep 17 00:00:00 2001 From: MoreRobustThanYou Date: Sat, 21 Oct 2017 21:15:21 -0400 Subject: [PATCH] Blood Brother now properly sets special role (#31964) * Blood Brother now properly sets special role * Update mob_helpers.dm * Update mob_helpers.dm * Update mob_helpers.dm --- code/datums/antagonists/brother.dm | 1 + code/modules/mob/mob_helpers.dm | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/datums/antagonists/brother.dm b/code/datums/antagonists/brother.dm index 77f611cf2c..6458e6da09 100644 --- a/code/datums/antagonists/brother.dm +++ b/code/datums/antagonists/brother.dm @@ -20,6 +20,7 @@ /datum/antagonist/brother/on_gain() SSticker.mode.brothers += owner owner.objectives += team.objectives + owner.special_role = special_role finalize_brother() return ..() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index a605d5e479..af12b87eec 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -335,9 +335,9 @@ It's fairly easy to fix if dealing with single letters but not so much with comp /proc/is_special_character(mob/M) // returns 1 for special characters and 2 for heroes of gamemode //moved out of admins.dm because things other than admin procs were calling this. if(!SSticker.HasRoundStarted()) - return 0 + return FALSE if(!istype(M)) - return 0 + return FALSE if(issilicon(M)) if(iscyborg(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor. var/mob/living/silicon/robot/R = M @@ -346,13 +346,13 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(R.connected_ai) if(is_special_character(R.connected_ai) && R.connected_ai.laws && (R.connected_ai.laws.zeroth_borg == R.laws.zeroth || R.connected_ai.laws.zeroth == R.laws.zeroth)) return 0 //AI is the real traitor here, so the borg itself is not a traitor - return 1 //Slaved but also a traitor - return 1 //Unslaved, traitor + return TRUE//Slaved but also a traitor + return TRUE //Unslaved, traitor else if(isAI(M)) var/mob/living/silicon/ai/A = M if(A.laws && A.laws.zeroth && A.mind && A.mind.special_role) - return 1 - return 0 + return TRUE + return FALSE if(M.mind && M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. switch(SSticker.mode.config_tag) if("revolution") @@ -379,8 +379,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if("abductor") if(M.mind in SSticker.mode.abductors) return 2 - return 1 - return 0 + return TRUE + if(M.mind && LAZYLEN(M.mind.antag_datums)) //they have an antag datum! + return TRUE + return FALSE /mob/proc/reagent_check(datum/reagent/R) // utilized in the species code return 1