Fixes anomalock heart cheese (#89681)

## About The Pull Request

Closes #89628
Closes #89627
This actually could cause the owner to lose their legitimately acquired
tenacity trauma which is pretty funny

## Changelog
🆑
fix: You can no longer activate anomalock heart's voltaic
overdrive/tenacity trauma by pulling off some surgery shenanigans
fix: You no longer lose tenacity trauma gained via lobotomy after losing
voltaic override
/🆑
This commit is contained in:
SmArtKar
2025-02-26 12:38:46 +01:00
committed by GitHub
parent 7fa385d13b
commit 8ef251cc28

View File

@@ -96,6 +96,8 @@
/obj/item/organ/heart/cybernetic/anomalock/on_life(seconds_per_tick, times_fired) /obj/item/organ/heart/cybernetic/anomalock/on_life(seconds_per_tick, times_fired)
. = ..() . = ..()
if(!core)
return
if(owner.blood_volume <= BLOOD_VOLUME_NORMAL) if(owner.blood_volume <= BLOOD_VOLUME_NORMAL)
owner.blood_volume += 5 * seconds_per_tick owner.blood_volume += 5 * seconds_per_tick
if(owner.health <= owner.crit_threshold) if(owner.health <= owner.crit_threshold)
@@ -185,19 +187,14 @@
owner.reagents.add_reagent(/datum/reagent/medicine/coagulant, 5) owner.reagents.add_reagent(/datum/reagent/medicine/coagulant, 5)
owner.add_filter("emp_shield", 2, outline_filter(1, "#639BFF")) owner.add_filter("emp_shield", 2, outline_filter(1, "#639BFF"))
to_chat(owner, span_revendanger("You feel a burst of energy! It's do or die!")) to_chat(owner, span_revendanger("You feel a burst of energy! It's do or die!"))
if(iscarbon(owner)) owner.add_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT, TRAIT_ANALGESIA), REF(src))
var/mob/living/carbon/carbon_owner = owner
carbon_owner.gain_trauma(/datum/brain_trauma/special/tenacity, TRAUMA_RESILIENCE_ABSOLUTE)
/datum/status_effect/voltaic_overdrive/on_remove() /datum/status_effect/voltaic_overdrive/on_remove()
. = ..() . = ..()
owner.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown) owner.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
owner.remove_filter("emp_shield") owner.remove_filter("emp_shield")
owner.balloon_alert(owner, "your heart weakens") owner.balloon_alert(owner, "your heart weakens")
if(iscarbon(owner)) owner.remove_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT, TRAIT_ANALGESIA), REF(src))
var/mob/living/carbon/carbon_owner = owner
carbon_owner.cure_trauma_type(/datum/brain_trauma/special/tenacity, TRAUMA_RESILIENCE_ABSOLUTE)
/atom/movable/screen/alert/status_effect/anomalock_active /atom/movable/screen/alert/status_effect/anomalock_active
name = "voltaic overdrive" name = "voltaic overdrive"