From d03d185cc2a04d1c35d51851076e95c1185d502c Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:18:07 +0300 Subject: [PATCH] a --- code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm | 1 + code/datums/components/xeno/hivemind_interference.dm | 6 ++++++ code/modules/mob/living/carbon/xenomorph/Abilities.dm | 2 +- .../xenomorph/abilities/praetorian/praetorian_powers.dm | 4 ++-- .../living/carbon/xenomorph/abilities/queen/queen_powers.dm | 2 +- .../living/carbon/xenomorph/strains/castes/drone/healer.dm | 4 ++-- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm b/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm index e76768a82b46..0fb755761143 100644 --- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm +++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm @@ -9,6 +9,7 @@ #define COMSIG_XENO_PRE_HEAL "xeno_pre_heal" #define COMPONENT_CANCEL_XENO_HEAL (1<<0) + #define COMPONENT_CANCEL_EXTERNAL_XENO_HEAL (1<<1) /// From ../xeno_action/activable/xeno_spit/use_ability #define COMSIG_XENO_POST_SPIT "xeno_spit" diff --git a/code/datums/components/xeno/hivemind_interference.dm b/code/datums/components/xeno/hivemind_interference.dm index 9a8a0db25567..3e976783ce84 100644 --- a/code/datums/components/xeno/hivemind_interference.dm +++ b/code/datums/components/xeno/hivemind_interference.dm @@ -9,6 +9,7 @@ if(!isxeno(parent)) return COMPONENT_INCOMPATIBLE ADD_TRAIT(parent, TRAIT_HIVEMIND_INTERFERENCE, TRAIT_SOURCE_HIVEMIND_INTERFERENCE) + RegisterSignal(parent, COMSIG_XENO_PRE_HEAL, PROC_REF(block_external_heal)) src.interference = interference src.max_buildup = max_buildup src.dissipation = dissipation @@ -51,6 +52,11 @@ return L += "Hivemind Interference: [interference]/[max_buildup]" +/datum/component/status_effect/interference/proc/block_external_heal() + SIGNAL_HANDLER + return COMPONENT_CANCEL_EXTERNAL_XENO_HEAL + /datum/component/status_effect/interference/cleanse() REMOVE_TRAIT(parent, TRAIT_HIVEMIND_INTERFERENCE, TRAIT_SOURCE_HIVEMIND_INTERFERENCE) + UnregisterSignal(parent, COMSIG_XENO_PRE_HEAL) return ..() diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index 35b532136f90..a4536a574ea9 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -314,7 +314,7 @@ to_chat(X, SPAN_XENOWARNING("This caste cannot be given plasma!")) return - if(SEND_SIGNAL(target, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL) + if(SEND_SIGNAL(target, COMSIG_XENO_PRE_HEAL) & (COMPONENT_CANCEL_XENO_HEAL|COMPONENT_CANCEL_EXTERNAL_XENO_HEAL)) to_chat(X, SPAN_XENOWARNING("This xeno cannot be given plasma!")) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm index 3cbf0769514f..b370da369574 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm @@ -788,7 +788,7 @@ var/use_plasma = FALSE if (curr_effect_type == WARDEN_HEAL_SHIELD) - if (SEND_SIGNAL(targetXeno, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL) + if (SEND_SIGNAL(targetXeno, COMSIG_XENO_PRE_HEAL) & (COMPONENT_CANCEL_XENO_HEAL|COMPONENT_CANCEL_EXTERNAL_XENO_HEAL)) to_chat(X, SPAN_XENOWARNING("We cannot bolster the defenses of this xeno!")) return @@ -828,7 +828,7 @@ if (!X.Adjacent(A)) to_chat(X, SPAN_XENODANGER("We must be within touching distance of [targetXeno]!")) return - if (SEND_SIGNAL(targetXeno, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL) + if (SEND_SIGNAL(targetXeno, COMSIG_XENO_PRE_HEAL) & (COMPONENT_CANCEL_XENO_HEAL|COMPONENT_CANCEL_EXTERNAL_XENO_HEAL)) to_chat(X, SPAN_XENOWARNING("We cannot heal this xeno!")) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm index 6ef111aed66f..44de503b4f39 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm @@ -274,7 +274,7 @@ if(!X.can_not_harm(Xa)) continue - if(SEND_SIGNAL(Xa, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL) + if(SEND_SIGNAL(Xa, COMSIG_XENO_PRE_HEAL) & (COMPONENT_CANCEL_XENO_HEAL|COMPONENT_CANCEL_EXTERNAL_XENO_HEAL)) if(verbose) to_chat(X, SPAN_XENOMINORWARNING("You cannot heal [Xa]!")) continue diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm index 1914b2c24b2b..01dfd3877980 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm @@ -90,8 +90,8 @@ if(!check_state()) return - if(SEND_SIGNAL(target_xeno, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL) - to_chat(src, SPAN_XENOWARNING("Extinguish [target_xeno] first or the flames will burn our resin salve away!")) + if(SEND_SIGNAL(target_xeno, COMSIG_XENO_PRE_HEAL) & (COMPONENT_CANCEL_XENO_HEAL|COMPONENT_CANCEL_EXTERNAL_XENO_HEAL)) + to_chat(src, SPAN_XENOWARNING("We cannot heal [target_xeno]!")) return if(!can_not_harm(target_xeno)) //We don't wanna heal hostile hives, but we do want to heal our allies!