From d287835d1427a4a9b7a9f448676d046e5d51318d Mon Sep 17 00:00:00 2001 From: Putnam Date: Sat, 18 Jan 2020 21:29:27 -0800 Subject: [PATCH] Made quirk blacklisting antag-sided --- code/datums/traits/_quirk.dm | 1 + code/datums/traits/negative.dm | 13 +++---------- code/modules/antagonists/_common/antag_datum.dm | 10 ++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/datums/traits/_quirk.dm b/code/datums/traits/_quirk.dm index 12e34b0c90..d73fa3c825 100644 --- a/code/datums/traits/_quirk.dm +++ b/code/datums/traits/_quirk.dm @@ -8,6 +8,7 @@ var/gain_text var/lose_text var/medical_record_text //This text will appear on medical records for the trait. Not yet implemented + var/antag_removal_text // Text will be given to the quirk holder if they get an antag that has it blacklisted. var/mood_quirk = FALSE //if true, this quirk affects mood and is unavailable if moodlets are disabled var/mob_trait //if applicable, apply and remove this mob trait var/mob/living/quirk_holder diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index c5217d8e4b..d556d02ebb 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -6,6 +6,7 @@ value = -2 gain_text = "You feel your vigor slowly fading away." lose_text = "You feel vigorous again." + antag_removal_text = "Your antagonistic nature has removed your blood deficiency." medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood." /datum/quirk/blooddeficiency/on_process() @@ -188,11 +189,7 @@ gain_text = "You feel repulsed by the thought of violence!" lose_text = "You think you can defend yourself again." medical_record_text = "Patient is unusually pacifistic and cannot bring themselves to cause physical harm." - -/datum/quirk/nonviolent/on_process() - if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums)) - to_chat(quirk_holder, "Your antagonistic nature has caused you to renounce your pacifism.") - qdel(src) + antag_removal_text = "Your antagonistic nature has caused you to renounce your pacifism." /datum/quirk/paraplegic name = "Paraplegic" @@ -355,6 +352,7 @@ gain_text = "You find yourself unable to speak!" lose_text = "You feel a growing strength in your vocal chords." medical_record_text = "Functionally mute, patient is unable to use their voice in any capacity." + antag_removal_text = "Your antagonistic nature has caused your voice to be heard." var/datum/brain_trauma/severe/mute/mute /datum/quirk/mute/add() @@ -366,11 +364,6 @@ var/mob/living/carbon/human/H = quirk_holder H?.cure_trauma_type(mute, TRAUMA_RESILIENCE_ABSOLUTE) -/datum/quirk/mute/on_process() - if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums)) - to_chat(quirk_holder, "Your antagonistic nature has caused your voice to be heard.") - qdel(src) - /datum/quirk/unstable name = "Unstable" desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!" diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 1894d8c7ae..064ae9043e 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -20,6 +20,7 @@ GLOBAL_LIST_EMPTY(antagonists) var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED var/show_name_in_check_antagonists = FALSE //Will append antagonist name in admin listings - use for categories that share more than one antag type + var/list/quirk_blacklist = list("Pacifist","Mute") // Quirks that will be removed upon gaining this antag. Pacifist and mute are default. /datum/antagonist/New() GLOB.antagonists += src @@ -70,6 +71,7 @@ GLOBAL_LIST_EMPTY(antagonists) greet() apply_innate_effects() give_antag_moodies() + remove_blacklisted_quirks() if(is_banned(owner.current) && replace_banned) replace_banned_player() @@ -117,6 +119,14 @@ GLOBAL_LIST_EMPTY(antagonists) return SEND_SIGNAL(owner.current, COMSIG_CLEAR_MOOD_EVENT, "antag_moodlet") +/datum/antagonist/proc/remove_blacklisted_quirks() + for(var/q in owner.roundstart_quirks) + var/datum/quirk/Q = q + if(Q.name in quirk_blacklist) + if(Q.antag_removal_text) + to_chat(owner, "[Q.antag_removal_text]") + owner.remove_quirk(Q.type) + //Returns the team antagonist belongs to if any. /datum/antagonist/proc/get_team() return