From 3fe0c3dc6baa01c11bb8bf117ff62889ce49fac3 Mon Sep 17 00:00:00 2001 From: LT3 <83487515+lessthnthree@users.noreply.github.com> Date: Fri, 25 Apr 2025 08:08:33 -0700 Subject: [PATCH] Supermatter anomaly fixes/explosion scaled hallucination (#90788) ## About The Pull Request - Some fixes for the supermatter crystal anomaly generation, ensuring they spawn outside the chamber windows and adds the outright missing dimensional anomalies. - Hallucination duration is calculated based on both distance from the SM as well as the size of the delam explosion (a modifier of 0.75x for a small explosion, up to 1.25x for the largest delam explosion) ## Why It's Good For The Game Bugfixes, improvement on the delam hallucination. ## Changelog :cl: LT3 fix: Fixed supermatter anomaly generation, hallucination is based on distance and delam explosion size /:cl: --- .../supermatter_delamination/delamination_effects.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/power/supermatter/supermatter_delamination/delamination_effects.dm b/code/modules/power/supermatter/supermatter_delamination/delamination_effects.dm index a4360d184eb..796a8345fb9 100644 --- a/code/modules/power/supermatter/supermatter_delamination/delamination_effects.dm +++ b/code/modules/power/supermatter/supermatter_delamination/delamination_effects.dm @@ -27,7 +27,8 @@ continue //Hilariously enough, running into a closet should make you get hit the hardest. - var/hallucination_amount = max(100 SECONDS, min(600 SECONDS, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(victim, sm) + 1)))) + //duration between min and max, calculated by distance from the supermatter and size of the delam explosion + var/hallucination_amount = LERP(DETONATION_HALLUCINATION_MIN, DETONATION_HALLUCINATION_MAX, 1 - get_dist(victim, sm) / 128) * LERP(0.75, 1.25, calculate_explosion(sm) * 0.5 / DELAM_MAX_DEVASTATION) victim.adjust_hallucinations(hallucination_amount) for(var/mob/victim as anything in GLOB.player_list)