From d57704c1559cf4d00f69c5d5c3a9a9785f2271bb Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 8 May 2024 10:46:05 -0400 Subject: [PATCH] Anomaly fixes (I hope) --- code/game/objects/effects/anomalies/_anomalies.dm | 9 ++++----- .../objects/effects/anomalies/anomalies_bioscrambler.dm | 7 +++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index 0dca4a8ffc45..531c800cf726 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -54,9 +54,8 @@ countdown = new(src) if(countdown_colour) countdown.color = countdown_colour - if(immortal) - return - countdown.start() + if(!immortal) + countdown.start() /obj/effect/anomaly/vv_edit_var(vname, vval) . = ..() @@ -81,7 +80,7 @@ return ..() /obj/effect/anomaly/proc/anomalyEffect(seconds_per_tick) - if(SPT_PROB(move_chance, seconds_per_tick)) + if(!immobile && SPT_PROB(move_chance, seconds_per_tick)) move_anomaly() /// Move in a direction @@ -99,7 +98,7 @@ new /obj/effect/particle_effect/fluid/smoke/bad(loc) if(drops_core) - aSignal.forceMove(drop_location()) + aSignal?.forceMove(drop_location()) aSignal = null // else, anomaly core gets deleted by qdel(src). diff --git a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm index 214440b92c2c..e4939c0de360 100644 --- a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm +++ b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm @@ -16,7 +16,10 @@ var/range = 5 /obj/effect/anomaly/bioscrambler/Initialize(mapload, new_lifespan, drops_core) - . = ..() + ..() + return INITIALIZE_HINT_LATELOAD + +/obj/effect/anomaly/bioscrambler/LateInitialize() pursuit_target = WEAKREF(find_nearest_target()) /obj/effect/anomaly/bioscrambler/anomalyEffect(seconds_per_tick) @@ -54,7 +57,7 @@ if (target.z != z) continue if (target.status_effects & GODMODE) - continue + continue if (target.stat >= UNCONSCIOUS) continue // Don't just haunt a corpse var/distance_from_target = get_dist(src, target)