From b2fa6060f67db9974b03cf342f3175e82a82380c Mon Sep 17 00:00:00 2001 From: Luc <89928798+lewcc@users.noreply.github.com> Date: Sat, 22 Apr 2023 03:29:32 -0400 Subject: [PATCH] Adds ghost notification when the singularity is (likely) loose. (#20826) * let you know when it's (probably) loose * better checks * guh * bwaaah * Update code/modules/power/singularity/singularity.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --- code/modules/power/singularity/narsie.dm | 3 +++ code/modules/power/singularity/singularity.dm | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 081cf0f6b79..41bf001c865 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -117,6 +117,9 @@ /obj/singularity/narsie/singularity_act() //handled in /obj/singularity/proc/consume return +/obj/singularity/narsie/notify_dead() + return + /obj/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO var/list/cultists = list() var/list/noncultists = list() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 7b8a43eb977..5684ba4823d 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -27,6 +27,8 @@ var/consumedSupermatter = FALSE //If the singularity has eaten a supermatter shard and can go to stage six var/warps_projectiles = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF + /// Whether or not we've pinged ghosts + var/isnt_shutting_down = FALSE /obj/singularity/Initialize(mapload, starting_energy = 50) . = ..() @@ -217,6 +219,7 @@ dissipate_delay = 10 dissipate_track = 0 dissipate_strength = 10 + notify_dead() if(STAGE_FIVE)//this one also lacks a check for gens because it eats everything current_size = STAGE_FIVE icon = 'icons/effects/288x288.dmi' @@ -416,6 +419,22 @@ C.IgniteMob() return +/obj/singularity/proc/notify_dead() + if(isnt_shutting_down) + return + notify_ghosts( + "IT'S LOOSE", + ghost_sound = 'sound/machines/warning-buzzer.ogg', + source = src, + action = NOTIFY_FOLLOW, + flashwindow = FALSE, + title = "IT'S LOOSE", + alert_overlay = image(icon='icons/obj/singularity.dmi', icon_state="singularity_s1") + ) + + isnt_shutting_down = TRUE + + /obj/singularity/proc/mezzer() for(var/mob/living/carbon/M in oviewers(8, src))