From 29d49fae638e37407c453796a52b652359d76af7 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 26 Nov 2023 12:08:09 +0300 Subject: [PATCH] [MIRROR] Fixes cyborged heretics seeing influences [MDB IGNORE] (#820) * Fixes cyborged heretics seeing influences (#79868) --------- Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: Nathan Singer Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/datums/mind/antag.dm | 1 + code/modules/antagonists/heretic/heretic_antag.dm | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/datums/mind/antag.dm b/code/datums/mind/antag.dm index 73aa56f80e4..f95b1992c0d 100644 --- a/code/datums/mind/antag.dm +++ b/code/datums/mind/antag.dm @@ -106,6 +106,7 @@ var/datum/antagonist/rev/revolutionary = has_antag_datum(/datum/antagonist/rev) revolutionary?.remove_revolutionary() + /** * ## give_uplink * diff --git a/code/modules/antagonists/heretic/heretic_antag.dm b/code/modules/antagonists/heretic/heretic_antag.dm index 6c47c6e7056..17cf0ce86d3 100644 --- a/code/modules/antagonists/heretic/heretic_antag.dm +++ b/code/modules/antagonists/heretic/heretic_antag.dm @@ -204,7 +204,7 @@ for(var/starting_knowledge in GLOB.heretic_start_knowledge) gain_knowledge(starting_knowledge) - GLOB.reality_smash_track.add_tracked_mind(owner) + addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) // Gain +1 knowledge every 20 minutes. return ..() @@ -213,7 +213,6 @@ var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] knowledge.on_lose(owner.current, src) - GLOB.reality_smash_track.remove_tracked_mind(owner) QDEL_LIST_ASSOC_VAL(researched_knowledge) return ..() @@ -222,6 +221,9 @@ handle_clown_mutation(our_mob, "Ancient knowledge described to you has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") our_mob.faction |= FACTION_HERETIC + if (!issilicon(our_mob)) + GLOB.reality_smash_track.add_tracked_mind(owner) + RegisterSignals(our_mob, list(COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED), PROC_REF(on_spell_cast)) RegisterSignal(our_mob, COMSIG_MOB_ITEM_AFTERATTACK, PROC_REF(on_item_afterattack)) RegisterSignal(our_mob, COMSIG_MOB_LOGIN, PROC_REF(fix_influence_network)) @@ -233,6 +235,9 @@ handle_clown_mutation(our_mob, removing = FALSE) our_mob.faction -= FACTION_HERETIC + if (owner in GLOB.reality_smash_track.tracked_heretics) + GLOB.reality_smash_track.remove_tracked_mind(owner) + UnregisterSignal(our_mob, list( COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED,