Skip to content

Commit

Permalink
Anomaly fixes (I hope)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed May 8, 2024
1 parent 72a3063 commit d57704c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions code/game/objects/effects/anomalies/_anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand All @@ -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
Expand All @@ -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).

Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_bioscrambler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d57704c

Please sign in to comment.