Fixes Dark Matter singularity getting stuck on other z levels. (#87113)

Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
EnterTheJake
2024-10-10 21:15:05 +02:00
committed by GitHub
co-authored by Xander3359 SmArtKar
parent ee8eee1f6e
commit 0a1e241b03
3 changed files with 20 additions and 12 deletions
@@ -21,6 +21,9 @@
/obj/singularity/dark_matter/Initialize(mapload, starting_energy)
. = ..()
COOLDOWN_START(src, initial_explosion_immunity, 5 SECONDS)
var/datum/component/singularity/resolved_singularity = singularity_component.resolve()
resolved_singularity.chance_to_move_to_target = 100
addtimer(CALLBACK(src, PROC_REF(normalize_tracking)), 20 SECONDS)
/obj/singularity/dark_matter/examine(mob/user)
. = ..()
@@ -50,4 +53,9 @@
desc = "You managed to make a singularity from dark matter, which makes no sense at all, and then you threw a supermatter into it? Are you fucking insane? Fuck it, praise Lord Singuloth."
consumed_supermatter = TRUE
///For 20 seconds, the singularity has buffed tracking to ensure it actually makes its way to the station, normalizes after 20 seconds
/obj/singularity/dark_matter/proc/normalize_tracking()
var/datum/component/singularity/resolved_singularity = singularity_component.resolve()
resolved_singularity.chance_to_move_to_target = consumed_supermatter ? initial(resolved_singularity.chance_to_move_to_target) + DARK_MATTER_SUPERMATTER_CHANCE_BONUS : initial(resolved_singularity.chance_to_move_to_target)
#undef DARK_MATTER_SUPERMATTER_CHANCE_BONUS