Allows admins to freeze the SM (#20616)

* allows admins to freeze the SM

* Hal9000 Review

* now works better than deleting frozen mobs!
This commit is contained in:
Coolrune206
2023-04-14 00:37:18 +10:00
committed by GitHub
parent ddbae79e7a
commit 7293b7ecbd
2 changed files with 22 additions and 0 deletions
+15
View File
@@ -92,3 +92,18 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
else
message_admins("<span class='notice'>[key_name_admin(admin)] [frozen ? "froze" : "unfroze"] an empty [name]</span>")
log_admin("[key_name(admin)] [frozen ? "froze" : "unfroze"] an empty [name]")
/obj/machinery/atmospherics/supermatter_crystal/admin_Freeze(client/admin)
var/obj/effect/overlay/adminoverlay/freeze_overlay = new
if(processes)
radio.autosay("Alert: Unknown intervention has frozen causality around the crystal. It is not progressing in local timespace.", name, "Engineering", list(z))
GLOB.frozen_atom_list += src
processes = FALSE
add_overlay(freeze_overlay)
else
radio.autosay("Alert: Unknown intervention has ceased around the crystal. It has returned to the regular flow of time.", name, "Engineering", list(z))
GLOB.frozen_atom_list -= src
processes = TRUE
cut_overlay(freeze_overlay)
message_admins("<span class='notice'>[key_name_admin(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal</span>")
log_admin("[key_name(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal")
@@ -212,6 +212,8 @@
SSair.atmos_machinery -= src
QDEL_NULL(radio)
GLOB.poi_list -= src
if(!processes)
GLOB.frozen_atom_list -= src
QDEL_NULL(countdown)
QDEL_NULL(soundloop)
return ..()
@@ -290,6 +292,11 @@
SEND_SOUND(M, sound('sound/machines/engine_alert2.ogg')) // then send them the sound file
radio.autosay(speaking, name, null, list(z))
for(var/i in SUPERMATTER_COUNTDOWN_TIME to 0 step -10)
if(!processes) // Stop exploding if you're frozen by an admin, damn you
cut_overlay(causality_field, TRUE)
final_countdown = FALSE
damage = explosion_point - 1 // One point below exploding, so it will re-start the countdown once unfrozen
return
if(damage < explosion_point) // Cutting it a bit close there engineers
radio.autosay("[safe_alert] Failsafe has been disengaged.", name, null, list(z))
cut_overlay(causality_field, TRUE)