diff --git a/_maps/map_files/VoidRaptor/VoidRaptor.dmm b/_maps/map_files/VoidRaptor/VoidRaptor.dmm
index d93426ee699..9b61e51839e 100644
--- a/_maps/map_files/VoidRaptor/VoidRaptor.dmm
+++ b/_maps/map_files/VoidRaptor/VoidRaptor.dmm
@@ -1343,6 +1343,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 4
},
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/east,
/turf/open/floor/engine,
/area/station/engineering/supermatter)
"atS" = (
@@ -18652,12 +18653,10 @@
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
"fvn" = (
-/obj/effect/turf_decal/stripes/line{
- dir = 5
- },
/obj/machinery/camera/directional/north{
dir = 9
},
+/obj/effect/turf_decal/stripes/red/box,
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
"fvr" = (
@@ -19093,6 +19092,10 @@
/obj/machinery/light/directional/north,
/turf/open/floor/iron/smooth,
/area/station/cargo/sorting)
+"fCh" = (
+/obj/machinery/button/delam_scram,
+/turf/closed/wall/r_wall,
+/area/station/engineering/supermatter/room)
"fCo" = (
/obj/machinery/status_display/ai/directional/north,
/obj/effect/landmark/start/corrections_officer,
@@ -27170,6 +27173,11 @@
},
/turf/open/floor/pod/dark,
/area/station/service/chapel/office)
+"hTn" = (
+/obj/effect/spawner/structure/window/reinforced/plasma,
+/obj/item/folder/biscuit/confidential/delam,
+/turf/open/floor/plating/airless,
+/area/station/engineering/supermatter/room)
"hTr" = (
/obj/effect/turf_decal/trimline/yellow/filled/warning{
dir = 10
@@ -38755,9 +38763,7 @@
/turf/open/floor/iron/dark/smooth_large,
/area/station/engineering/atmos/hfr_room)
"lcn" = (
-/obj/effect/turf_decal/trimline/yellow/filled/line{
- dir = 6
- },
+/obj/effect/turf_decal/stripes/red/box,
/turf/open/floor/iron/smooth,
/area/station/engineering/main)
"lcr" = (
@@ -39776,9 +39782,6 @@
/obj/structure/rack,
/obj/item/gun/energy/e_gun/dragnet,
/obj/item/gun/energy/e_gun/dragnet,
-/obj/item/melee/breaching_hammer,
-/obj/item/melee/breaching_hammer,
-/obj/item/melee/breaching_hammer,
/obj/effect/turf_decal/tile/dark_red/half,
/obj/machinery/camera/directional/south{
c_tag = "Armory - Interior"
@@ -76072,9 +76075,11 @@
/area/station/ai_monitored/turret_protected/aisat/service)
"vqa" = (
/obj/machinery/atmospherics/pipe/smart/manifold4w/green/visible,
-/obj/effect/turf_decal/stripes/line,
-/obj/machinery/firealarm/directional/south,
/obj/structure/cable,
+/obj/machinery/firealarm/directional/south{
+ pixel_y = -32
+ },
+/obj/effect/turf_decal/stripes/line,
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
"vqt" = (
@@ -121106,7 +121111,7 @@ xMx
iPJ
mTO
hYs
-hLh
+hTn
cju
tUK
orq
@@ -121363,7 +121368,7 @@ bOD
leI
jvd
lcn
-oCl
+fCh
fvn
oiv
oiv
diff --git a/_maps/skyrat/automapper/automapper_config.toml b/_maps/skyrat/automapper/automapper_config.toml
index 28076a77152..18d000278ed 100644
--- a/_maps/skyrat/automapper/automapper_config.toml
+++ b/_maps/skyrat/automapper/automapper_config.toml
@@ -67,6 +67,14 @@ required_map = "MetaStation.dmm"
coordinates = [57, 119, 1]
trait_name = "Station"
+# Metastation Supermatter Chamber
+[templates.metastation_supermatter]
+map_files = ["metastation_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/metastation/"
+required_map = "MetaStation.dmm"
+coordinates = [163, 155, 1]
+trait_name = "Station"
+
# DELTASTATION MAP EDITS
# Deltastation Arrivals
[templates.deltastation_arrivals]
@@ -108,6 +116,14 @@ required_map = "DeltaStation2.dmm"
coordinates = [123, 143, 1]
trait_name = "Station"
+# Deltastation Supermatter Chamber
+[templates.deltastation_supermatter]
+map_files = ["deltastation_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/deltastation/"
+required_map = "DeltaStation2.dmm"
+coordinates = [84, 109, 1]
+trait_name = "Station"
+
# ICEBOX MAP EDITS
# Icebox Arrivals
[templates.icebox_arrivals]
@@ -157,6 +173,14 @@ required_map = "IceBoxStation.dmm"
coordinates = [98, 123, 3]
trait_name = "Station"
+# Icebox Supermatter Chamber
+[templates.icebox_supermatter]
+map_files = ["icebox_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/icebox/"
+required_map = "IceBoxStation.dmm"
+coordinates = [114, 65, 3]
+trait_name = "Station"
+
# KILOSTATION MAP EDITS
# Kilostation Arrivals
[templates.kilostation_arrivals]
@@ -231,6 +255,14 @@ required_map = "tramstation.dmm"
coordinates = [34, 135, 2]
trait_name = "Station"
+# Tramstation Supermatter Chamber
+[templates.tramstation_supermatter]
+map_files = ["tramstation_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/tramstation/"
+required_map = "tramstation.dmm"
+coordinates = [118, 75, 1]
+trait_name = "Station"
+
# BIRDSHOT MAP EDITS
# Birdshot Arrivals
[templates.birdshot_arrivals]
@@ -280,6 +312,14 @@ required_map = "birdshot.dmm"
coordinates = [188, 72, 1]
trait_name = "Station"
+# Birdshot Supermatter Chamber
+[templates.birdshot_supermatter]
+map_files = ["birdshot_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/birdshot/"
+required_map = "birdshot.dmm"
+coordinates = [41, 201, 1]
+trait_name = "Station"
+
# NORTHSTAR MAP EDITS
# Northstar Cryo
[templates.northstar_cryo]
@@ -344,3 +384,11 @@ directory = "_maps/skyrat/automapper/templates/northstar/"
required_map = "north_star.dmm"
coordinates = [150, 114, 3]
trait_name = "Station"
+
+# Northstar Supermatter Chamber
+[templates.northstar_supermatter]
+map_files = ["northstar_supermatter.dmm"]
+directory = "_maps/skyrat/automapper/templates/northstar/"
+required_map = "north_star.dmm"
+coordinates = [174, 129, 1]
+trait_name = "Station"
diff --git a/_maps/skyrat/automapper/templates/birdshot/birdshot_supermatter.dmm b/_maps/skyrat/automapper/templates/birdshot/birdshot_supermatter.dmm
new file mode 100644
index 00000000000..33005aba421
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/birdshot/birdshot_supermatter.dmm
@@ -0,0 +1,71 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/template_noop,
+/area/template_noop)
+"b" = (
+/obj/effect/turf_decal/stripes/red/box,
+/obj/machinery/atmospherics/pipe/smart/simple/cyan/visible{
+ dir = 8
+ },
+/turf/open/floor/iron/smooth,
+/area/station/engineering/supermatter/room)
+"j" = (
+/obj/machinery/airalarm/directional/south,
+/turf/template_noop,
+/area/template_noop)
+"v" = (
+/obj/item/folder/biscuit/confidential/delam,
+/turf/template_noop,
+/area/template_noop)
+"B" = (
+/obj/machinery/button/delam_scram,
+/turf/closed/wall,
+/area/station/engineering/supermatter/room)
+"D" = (
+/obj/effect/turf_decal/stripes/line{
+ dir = 10
+ },
+/obj/effect/turf_decal/trimline/yellow/line{
+ dir = 4
+ },
+/obj/structure/cable,
+/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4,
+/turf/open/floor/iron/smooth,
+/area/station/engineering/supermatter/room)
+"T" = (
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/east,
+/turf/template_noop,
+/area/template_noop)
+
+(1,1,1) = {"
+T
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+j
+a
+"}
+(3,1,1) = {"
+a
+v
+a
+b
+B
+a
+"}
+(4,1,1) = {"
+a
+a
+a
+a
+D
+a
+"}
diff --git a/_maps/skyrat/automapper/templates/deltastation/deltastation_supermatter.dmm b/_maps/skyrat/automapper/templates/deltastation/deltastation_supermatter.dmm
new file mode 100644
index 00000000000..3ede0c69f00
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/deltastation/deltastation_supermatter.dmm
@@ -0,0 +1,92 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/template_noop,
+/area/template_noop)
+"i" = (
+/obj/effect/turf_decal/stripes/red/box,
+/turf/template_noop,
+/area/template_noop)
+"j" = (
+/obj/item/folder/biscuit/confidential/delam,
+/turf/template_noop,
+/area/template_noop)
+"l" = (
+/obj/machinery/button/delam_scram,
+/turf/closed/wall/r_wall,
+/area/station/engineering/supermatter/room)
+"t" = (
+/obj/machinery/atmospherics/components/unary/delam_scram{
+ dir = 4
+ },
+/turf/template_noop,
+/area/template_noop)
+"M" = (
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/smart/manifold4w/cyan/visible,
+/obj/machinery/meter,
+/turf/open/floor/iron,
+/area/station/engineering/supermatter/room)
+
+(1,1,1) = {"
+t
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+"}
+(3,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+"}
+(4,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+"}
+(5,1,1) = {"
+a
+a
+a
+a
+M
+a
+a
+"}
+(6,1,1) = {"
+a
+a
+a
+a
+i
+l
+i
+"}
+(7,1,1) = {"
+a
+a
+a
+a
+a
+j
+a
+"}
diff --git a/_maps/skyrat/automapper/templates/icebox/icebox_supermatter.dmm b/_maps/skyrat/automapper/templates/icebox/icebox_supermatter.dmm
new file mode 100644
index 00000000000..8c6304ec809
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/icebox/icebox_supermatter.dmm
@@ -0,0 +1,73 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/template_noop,
+/area/template_noop)
+"t" = (
+/obj/machinery/button/delam_scram,
+/turf/template_noop,
+/area/template_noop)
+"x" = (
+/obj/item/folder/biscuit/confidential/delam,
+/turf/template_noop,
+/area/template_noop)
+"H" = (
+/obj/effect/turf_decal/stripes/red/box,
+/turf/template_noop,
+/area/template_noop)
+"J" = (
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/east,
+/turf/template_noop,
+/area/template_noop)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+J
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(3,1,1) = {"
+H
+t
+H
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(4,1,1) = {"
+a
+x
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/skyrat/automapper/templates/metastation/metastation_supermatter.dmm b/_maps/skyrat/automapper/templates/metastation/metastation_supermatter.dmm
new file mode 100644
index 00000000000..dae4b01581d
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/metastation/metastation_supermatter.dmm
@@ -0,0 +1,91 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/template_noop,
+/area/template_noop)
+"h" = (
+/obj/machinery/button/delam_scram,
+/turf/closed/wall/r_wall,
+/area/station/engineering/supermatter/room)
+"x" = (
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
+/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/effect/turf_decal/stripes/red/box,
+/turf/open/floor/iron,
+/area/station/engineering/main)
+"C" = (
+/obj/effect/turf_decal/stripes/red/box,
+/turf/open/floor/engine,
+/area/station/engineering/supermatter/room)
+"R" = (
+/obj/item/folder/biscuit/confidential/delam,
+/turf/template_noop,
+/area/template_noop)
+"V" = (
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/west,
+/turf/template_noop,
+/area/template_noop)
+
+(1,1,1) = {"
+x
+h
+C
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+R
+a
+a
+a
+a
+a
+a
+"}
+(3,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(4,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(5,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(6,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+V
+"}
diff --git a/_maps/skyrat/automapper/templates/northstar/northstar_supermatter.dmm b/_maps/skyrat/automapper/templates/northstar/northstar_supermatter.dmm
new file mode 100644
index 00000000000..2c83fd47def
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/northstar/northstar_supermatter.dmm
@@ -0,0 +1,84 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/west,
+/turf/template_noop,
+/area/template_noop)
+"q" = (
+/obj/effect/turf_decal/stripes/red/box,
+/turf/template_noop,
+/area/template_noop)
+"s" = (
+/obj/structure/cable,
+/obj/machinery/incident_display/delam/directional/north,
+/turf/open/floor/iron/half{
+ dir = 1
+ },
+/area/station/engineering/lobby)
+"x" = (
+/turf/template_noop,
+/area/template_noop)
+"I" = (
+/obj/effect/spawner/structure/window/reinforced/plasma,
+/obj/structure/cable,
+/obj/item/folder/biscuit/confidential/delam,
+/turf/open/floor/plating,
+/area/station/engineering/supermatter/room)
+"O" = (
+/obj/machinery/button/delam_scram,
+/turf/closed/wall/r_wall,
+/area/station/engineering/supermatter/room)
+"S" = (
+/obj/effect/turf_decal/stripes/red/box,
+/turf/open/floor/iron/half{
+ dir = 1
+ },
+/area/station/engineering/lobby)
+
+(1,1,1) = {"
+s
+S
+x
+x
+"}
+(2,1,1) = {"
+I
+O
+x
+x
+"}
+(3,1,1) = {"
+x
+q
+x
+x
+"}
+(4,1,1) = {"
+x
+x
+x
+x
+"}
+(5,1,1) = {"
+x
+x
+x
+x
+"}
+(6,1,1) = {"
+x
+x
+x
+x
+"}
+(7,1,1) = {"
+x
+x
+x
+x
+"}
+(8,1,1) = {"
+x
+x
+x
+a
+"}
diff --git a/_maps/skyrat/automapper/templates/tramstation/tramstation_supermatter.dmm b/_maps/skyrat/automapper/templates/tramstation/tramstation_supermatter.dmm
new file mode 100644
index 00000000000..a8b22dcfaa5
--- /dev/null
+++ b/_maps/skyrat/automapper/templates/tramstation/tramstation_supermatter.dmm
@@ -0,0 +1,84 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/template_noop,
+/area/template_noop)
+"k" = (
+/obj/item/folder/biscuit/confidential/delam,
+/turf/template_noop,
+/area/template_noop)
+"l" = (
+/obj/machinery/power/apc/auto_name/directional/east,
+/obj/structure/cable,
+/obj/effect/turf_decal/stripes/red/box,
+/turf/open/floor/iron,
+/area/station/engineering/main)
+"m" = (
+/obj/structure/table/reinforced,
+/obj/item/clothing/head/utility/radiation,
+/obj/item/clothing/glasses/meson,
+/obj/item/geiger_counter,
+/obj/item/geiger_counter,
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/engine,
+/area/station/engineering/supermatter/room)
+"q" = (
+/obj/effect/turf_decal/stripes/red/box,
+/obj/machinery/button/delam_scram,
+/turf/closed/wall/r_wall,
+/area/station/engineering/supermatter/room)
+"D" = (
+/obj/machinery/atmospherics/components/unary/delam_scram/directional/east,
+/turf/template_noop,
+/area/template_noop)
+"E" = (
+/obj/structure/cable,
+/obj/effect/turf_decal/stripes/red/box,
+/turf/open/floor/engine,
+/area/station/engineering/supermatter/room)
+
+(1,1,1) = {"
+a
+a
+m
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(3,1,1) = {"
+a
+k
+a
+a
+a
+a
+a
+a
+D
+"}
+(4,1,1) = {"
+l
+q
+E
+a
+a
+a
+a
+a
+a
+"}
diff --git a/code/__DEFINES/~skyrat_defines/events.dm b/code/__DEFINES/~skyrat_defines/events.dm
index a522075fe95..16349479cad 100644
--- a/code/__DEFINES/~skyrat_defines/events.dm
+++ b/code/__DEFINES/~skyrat_defines/events.dm
@@ -11,3 +11,6 @@
#define EVENT_LOWPOP_TIMER_MULTIPLIER 2
#define EVENT_MIDPOP_TIMER_MULTIPLIER 1.5
#define EVENT_HIGHPOP_TIMER_MULTIPLIER 1
+
+/// Reason for delam suppression: admin command
+#define DIVINE_INTERVENTION 3
diff --git a/code/__DEFINES/~skyrat_defines/signals.dm b/code/__DEFINES/~skyrat_defines/signals.dm
index d889d8c605d..095a5ff8b42 100644
--- a/code/__DEFINES/~skyrat_defines/signals.dm
+++ b/code/__DEFINES/~skyrat_defines/signals.dm
@@ -37,6 +37,9 @@
#define COMPONENT_NO_CELL (1<<1)
#define COMPONENT_NO_CHARGE (1<<2)
+/// Sent when supermatter begins its delam countdown/when the suppression system is triggered: (var/trigger_reason)
+#define COMSIG_MAIN_SM_DELAMINATING "delam_time"
+
// Health signals
/// /mob/living/proc/updatehealth()
#define COMSIG_MOB_RUN_ARMOR "mob_run_armor"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 5873ff0d590..9d3dcd6a421 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -153,6 +153,8 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/spawn_sunbeam, /*SKYRAT EDIT ADDITION*/
/client/proc/intensity_credits_panel, /*SKYRAT EDIT ADDITION*/
/client/proc/toggle_bsa, /*SKYRAT EDIT ADDITION*/
+ /client/proc/try_stop_delam, /*SKYRAT EDIT ADDITION*/
+ /client/proc/toggle_delam_suppression, /*SKYRAT EDIT ADDITION*/
))
GLOBAL_PROTECT(admin_verbs_fun)
GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom, /datum/admins/proc/podspawn_atom, /datum/admins/proc/spawn_cargo, /datum/admins/proc/spawn_objasmob, /client/proc/respawn_character, /datum/admins/proc/beaker_panel))
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index c4862a3b2a6..2b6c31231fc 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -480,6 +480,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
final_countdown = TRUE
+ SEND_GLOBAL_SIGNAL(COMSIG_MAIN_SM_DELAMINATING, final_countdown) // SKYRAT EDIT ADDITION - DELAM_SCRAM
notify_ghosts("[src] has begun the delamination process!", source = src, header = "Meltdown Incoming")
var/datum/sm_delam/last_delamination_strategy = delamination_strategy
diff --git a/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm b/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm
index 1fb90ea674b..5091b768bed 100644
--- a/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm
+++ b/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm
@@ -37,6 +37,8 @@ GLOBAL_LIST_INIT(sm_delam_list, list(
if(sm.damage <= sm.warning_point) // Damage is too low, lets not
return FALSE
+ notify_delam_suppression(sm) // SKYRAT EDIT ADDITION - DELAM_SCRAM
+
if (sm.damage >= sm.emergency_point && sm.damage_archived < sm.emergency_point)
sm.investigate_log("has entered the emergency point.", INVESTIGATE_ENGINE)
message_admins("[sm] has entered the emergency point [ADMIN_VERBOSEJMP(sm)].")
diff --git a/modular_skyrat/modules/airlock_override/code/airlock_override.dm b/modular_skyrat/modules/airlock_override/code/airlock_override.dm
index b94b7c09e59..add9454b30c 100644
--- a/modular_skyrat/modules/airlock_override/code/airlock_override.dm
+++ b/modular_skyrat/modules/airlock_override/code/airlock_override.dm
@@ -163,3 +163,20 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
engineering_override = TRUE
normalspeed = FALSE
update_appearance()
+
+/**
+ * Make the airlock unrestricted as a temporary emergency exit.
+ *
+ * Arguments:
+ * * duration - How long the door will operate as an emergency exit before reverting to normal operation
+ *
+*/
+/obj/machinery/door/airlock/proc/temp_emergency_exit(duration)
+ if(!emergency)
+ set_emergency_exit(TRUE)
+ addtimer(CALLBACK(src, PROC_REF(set_emergency_exit), FALSE), duration)
+
+/// Set the airlock's emergency exit status arg: active TRUE/FALSE
+/obj/machinery/door/airlock/proc/set_emergency_exit(active)
+ emergency = active
+ update_appearance()
diff --git a/modular_skyrat/modules/delam_emergency_stop/README.md b/modular_skyrat/modules/delam_emergency_stop/README.md
new file mode 100644
index 00000000000..2c25a50a124
--- /dev/null
+++ b/modular_skyrat/modules/delam_emergency_stop/README.md
@@ -0,0 +1,41 @@
+https://github.com/Skyrat-SS13/Skyrat-tg/pull/22145
+
+## Title: Delam SCRAM (Suppression System)
+
+MODULE ID: DELAM_SCRAM
+
+### Description:
+
+Adds an emergency stop for the supermatter engine. Operable in the first 30 minutes, allows Engineering to screw up without admin intervention to delete the crystal.
+
+### TG Proc Changes:
+
+File Location | Changed TG Proc
+------------- | ---------------
+`code/modules/power/supermatter/supermatter.dm`
+`/obj/machinery/power/supermatter_crystal/proc/count_down`
+
+`code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm`
+`/datum/sm_delam/proc/delam_progress(obj/machinery/power/supermatter_crystal/sm)`
+
+### TG File Changes:
+
+- code/modules/power/supermatter/supermatter.dm
+- code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm
+
+### Defines:
+
+File Location | Defines
+------------- | -------
+code/__DEFINES/~skyrat_defines/signals.dm | `#define COMSIG_MAIN_SM_DELAMINATING "delam_time"`
+
+### Master file additions
+
+- N/A
+
+### Included files that are not contained in this module:
+
+- N/A
+
+### Credits:
+- LT3
diff --git a/modular_skyrat/modules/delam_emergency_stop/code/admin_scram.dm b/modular_skyrat/modules/delam_emergency_stop/code/admin_scram.dm
new file mode 100644
index 00000000000..fc338d7b214
--- /dev/null
+++ b/modular_skyrat/modules/delam_emergency_stop/code/admin_scram.dm
@@ -0,0 +1,73 @@
+/// Lets an admin activate the delam suppression system
+/client/proc/try_stop_delam()
+ set name = "Delam Emergency Stop"
+ set category = "Admin.Events"
+ var/obj/machinery/atmospherics/components/unary/delam_scram/suppression_system = null
+
+ if(!holder || !check_rights(R_FUN))
+ return
+
+ suppression_system = validate_suppression_status()
+
+ if(!suppression_system)
+ return
+
+ // Warn them if they're intervening in the work of God
+ if(world.time - SSticker.round_start_time < 30 MINUTES)
+ var/go_early = tgui_alert(usr, "The [suppression_system.name] is set to automatically start at the programmed time. \
+ Are you sure you want to override this and fire it early? It's less scary that way.", "Suffering premature delamination?", list("No", "Yes"))
+ if(go_early != "Yes")
+ return FALSE
+
+ var/double_check = tgui_alert(usr, "You really sure that you want to push this?", "Reticulating Splines", list("No", "Yes"))
+ if(double_check != "Yes")
+ return FALSE
+
+ // Send the signal to start, unlock the temp emergency exits
+ log_admin("[key_name_admin(usr)] started a supermatter emergency stop!")
+ message_admins("[ADMIN_LOOKUPFLW(usr)] started a supermatter emergency stop! [ADMIN_COORDJMP(suppression_system)]")
+ suppression_system.investigate_log("[key_name_admin(usr)] started a supermatter emergency stop!", INVESTIGATE_ATMOS)
+ SEND_GLOBAL_SIGNAL(COMSIG_MAIN_SM_DELAMINATING, DIVINE_INTERVENTION)
+ for(var/obj/machinery/door/airlock/escape_route in range(14, suppression_system)) // a little more space here due to positioning
+ if(istype(escape_route, /obj/machinery/door/airlock/command))
+ continue
+ INVOKE_ASYNC(escape_route, TYPE_PROC_REF(/obj/machinery/door/airlock, temp_emergency_exit), 45 SECONDS)
+
+/// Lets admins disable/enable the delam suppression system
+/client/proc/toggle_delam_suppression()
+ set name = "Delam Suppression Toggle"
+ set category = "Admin.Events"
+
+ if(!holder || !check_rights(R_FUN))
+ return
+
+ var/obj/machinery/atmospherics/components/unary/delam_scram/suppression_system = validate_suppression_status()
+
+ if(!suppression_system)
+ return
+
+ suppression_system.admin_disabled = !suppression_system.admin_disabled
+
+ log_admin("[key_name_admin(usr)] toggled Delam suppression [suppression_system.admin_disabled ? "OFF" : "ON"].")
+ message_admins("[key_name_admin(usr)] toggled Delam suppression [suppression_system.admin_disabled ? "OFF" : "ON"].")
+
+/// Check if the delam suppression setup is valid on the map
+/proc/validate_suppression_status()
+ var/obj/machinery/atmospherics/components/unary/delam_scram/my_one_and_only = null
+ for(var/obj/machinery/atmospherics/components/unary/delam_scram/system as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/delam_scram))
+ if(!my_one_and_only)
+ my_one_and_only = system
+ else
+ message_admins("Delam suppression request FAILED: Multiple Delam SCRAM units found on map! Delete the extra unit at [ADMIN_COORDJMP(system)] if applicable and try again.")
+ stack_trace("Multiple Delam SCRAM units found on map at [system.loc]. Either someone spawned in a duplicate or you need to yell at a mapper!") // We could fire anyways, but who knows where the mystery extra machine(s) are.
+ return FALSE
+
+ if(!my_one_and_only)
+ message_admins("No active delam SCRAM units found on map! Either it's not mapped or it's already been used!")
+ return FALSE
+
+ if(my_one_and_only.on)
+ message_admins("[my_one_and_only] can't fire, it's already been triggered!")
+ return FALSE
+
+ return my_one_and_only
diff --git a/modular_skyrat/modules/delam_emergency_stop/code/delam.dm b/modular_skyrat/modules/delam_emergency_stop/code/delam.dm
new file mode 100644
index 00000000000..29342d26511
--- /dev/null
+++ b/modular_skyrat/modules/delam_emergency_stop/code/delam.dm
@@ -0,0 +1,61 @@
+/obj/machinery/power/supermatter_crystal
+ /// If admins and the station have been notified according to the delam suppression function
+ var/station_notified = FALSE
+
+/datum/sm_delam/proc/notify_delam_suppression(obj/machinery/power/supermatter_crystal/sm)
+ if(!sm.is_main_engine)
+ return
+
+ if(sm.station_notified)
+ return
+
+ if(world.time - SSticker.round_start_time > 30 MINUTES)
+ return
+
+ if(SSjob.is_skeleton_engineering(3)) // Don't bother if there's command or a well staffed department, they -should- be paying attention.
+ var/obj/machinery/announcement_system/system = pick(GLOB.announcement_systems)
+ SSsecurity_level.minimum_security_level(SEC_LEVEL_ORANGE, TRUE, FALSE) // Give the skeleton crew a warning
+ system.broadcast("The supermatter delamination early warning system has been triggered due to anomalous conditions. Please investigate the engine as soon as possible.", list(RADIO_CHANNEL_COMMAND))
+ system.broadcast("In the event of uncontrolled delamination, please consult the documentation packet regarding usage of the supermatter emergency stop button.", list(RADIO_CHANNEL_COMMAND))
+ system.broadcast("Failure to stabilise the engine may result in an automatic deployment of the suppression system.", list(RADIO_CHANNEL_COMMAND))
+
+ log_admin("DELAM: Round timer under 30 minutes! Supermatter will perform an automatic delam suppression at strength 0%.")
+ for(var/client/staff as anything in GLOB.admins)
+ if(staff?.prefs.read_preference(/datum/preference/toggle/comms_notification))
+ SEND_SOUND(staff, sound('sound/misc/server-ready.ogg'))
+ message_admins("DELAM: Round timer under 30 minutes! [ADMIN_VERBOSEJMP(sm)] will perform an automatic delam suppression once integrity reaches 0%. (TOGGLE AUTOMATIC INTERVENTION))")
+ sm.station_notified = TRUE
+
+/datum/sm_delam/Topic(href, href_list)
+ if(..())
+ return
+
+ if(!check_rights(R_FUN))
+ return
+
+ if(href_list["togglesuppression"])
+ usr.client?.toggle_delam_suppression()
+
+/**
+ * Check if the station manifest has at least a certain amount of this staff type
+ *
+ * Arguments:
+ * * crew_threshold - amount of crew before it's no longer considered a skeleton crew
+ *
+*/
+/datum/controller/subsystem/job/proc/is_skeleton_engineering(crew_threshold)
+ var/engineers = 0
+ for(var/datum/record/crew/target in GLOB.manifest.general)
+ if(target.trim == JOB_CHIEF_ENGINEER)
+ return FALSE
+
+ if(target.trim == JOB_STATION_ENGINEER)
+ engineers++
+
+ if(target.trim == JOB_ATMOSPHERIC_TECHNICIAN)
+ engineers++
+
+ if(engineers > crew_threshold)
+ return FALSE
+
+ return TRUE
diff --git a/modular_skyrat/modules/delam_emergency_stop/code/scram.dm b/modular_skyrat/modules/delam_emergency_stop/code/scram.dm
new file mode 100644
index 00000000000..1cc11c47ef9
--- /dev/null
+++ b/modular_skyrat/modules/delam_emergency_stop/code/scram.dm
@@ -0,0 +1,479 @@
+#define DELAM_MACHINE_POWER_CONSUMPTION 375
+#define SM_PREVENT_EXPLOSION_THRESHOLD 100
+#define SM_COOLING_MIXTURE_MOLES 64000
+#define SM_COOLING_MIXTURE_TEMP 120
+#define DAMAGED_SUPERMATTER_COLOR list(1,0.1,0.2,0, 0,0.9,0.1,0, 0.1,-0.05,0.85,0, 0,0,0,0.9, 0,0,0,0)
+#define MISTAKES_WERE_MADE 0
+#define MANUAL_INTERVENTION 0
+#define AUTOMATIC_SAFETIES 1
+#define BUTTON_PUSHED 0
+#define BUTTON_IDLE 1
+#define BUTTON_AWAKE 2
+#define BUTTON_ARMED 3
+#define SM_DAMAGED_EXPLOSION_POWER 41
+#define SHATTER_DEVASTATION_RANGE 0
+#define SHATTER_HEAVY_RANGE 0
+#define SHATTER_LIGHT_RANGE 0
+#define SHATTER_FLAME_RANGE 3
+#define SHATTER_FLASH_RANGE 5
+#define SHATTER_MIN_TIME 13 SECONDS
+#define SHATTER_MAX_TIME 15 SECONDS
+#define POWER_CUT_MIN_DURATION 19 SECONDS
+#define POWER_CUT_MAX_DURATION 21 SECONDS
+#define AIR_INJECT_RATE 33
+#define BUTTON_SOUND_RANGE 7
+#define BUTTON_SOUND_FALLOFF_DISTANCE 7
+#define MACHINE_SOUND_RANGE 15
+#define MACHINE_RUMBLE_SOUND_RANGE 30
+#define MACHINE_SOUND_FALLOFF_DISTANCE 10
+
+/// An atmos device that uses freezing cold air to attempt an emergency shutdown of the supermatter engine
+/obj/machinery/atmospherics/components/unary/delam_scram
+ icon = 'modular_skyrat/modules/delam_emergency_stop/icons/scram.dmi'
+ icon_state = "dispenser-idle"
+ name = "\improper delamination suppression system"
+ desc = "The latest model in Nakamura Engineering's line of delamination suppression systems.
You don't want to be in the chamber when it's activated!
\
+ Come to think of it, CentCom would rather you didn't activate it at all.
These things are expensive!"
+ use_power = IDLE_POWER_USE
+ can_unwrench = FALSE // comedy option, what if unwrenching trying to steal it throws you into the crystal for a nice dusting
+ shift_underlay_only = FALSE
+ hide = TRUE
+ piping_layer = PIPING_LAYER_MAX
+ pipe_state = "injector"
+ resistance_flags = FIRE_PROOF | FREEZE_PROOF | UNACIDABLE
+ idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION * 4
+
+ ///Rate of operation of the device (L/s)
+ var/volume_rate = AIR_INJECT_RATE
+ ///weakref to our SM
+ var/datum/weakref/my_sm
+ ///Our internal radio
+ var/obj/item/radio/radio
+ ///The key our internal radio uses
+ var/radio_key = /obj/item/encryptionkey/headset_eng
+ ///Radio channels, need null to actually broadcast on common, lol
+ var/emergency_channel = null
+ var/warning_channel = RADIO_CHANNEL_ENGINEERING
+ ///If someone -really- wants the SM to explode
+ var/admin_disabled = FALSE
+
+
+/obj/machinery/atmospherics/components/unary/delam_scram/Initialize(mapload)
+ . = ..()
+
+ return INITIALIZE_HINT_LATELOAD
+
+/obj/machinery/atmospherics/components/unary/delam_scram/LateInitialize()
+ . = ..()
+ if(isnull(id_tag))
+ id_tag = "SCRAM"
+
+ radio = new(src)
+ radio.keyslot = new radio_key
+ radio.set_listening(FALSE)
+ radio.recalculateChannels()
+
+ marry_sm()
+ RegisterSignal(SSdcs, COMSIG_MAIN_SM_DELAMINATING, PROC_REF(panic_time))
+
+/obj/machinery/atmospherics/components/unary/delam_scram/Destroy()
+ QDEL_NULL(radio)
+ my_sm = null
+ return ..()
+
+/// Sets the weakref to the SM
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/marry_sm()
+ my_sm = WEAKREF(GLOB.main_supermatter_engine)
+
+/obj/machinery/atmospherics/components/unary/delam_scram/update_icon_nopipes()
+ return
+
+/**
+ * The atmos code is functionally identical to /obj/machinery/atmospherics/components/unary/outlet_injector
+ * However this is a hardened all-in-one unit that can't have its controls
+ * tampered with like an outlet injector
+*/
+/obj/machinery/atmospherics/components/unary/delam_scram/process_atmos()
+ ..()
+ if(!on || !is_operational)
+ return
+
+ var/turf/location = get_turf(loc)
+
+ if(isclosedturf(location))
+ return
+
+ var/datum/gas_mixture/air_contents = airs[1]
+
+ if(air_contents.temperature > 0)
+ var/transfer_moles = (air_contents.return_pressure() * volume_rate) / (air_contents.temperature * R_IDEAL_GAS_EQUATION)
+
+ if(!transfer_moles)
+ return
+
+ var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
+
+ location.assume_air(removed)
+ update_parents()
+
+/// Signal handler for the emergency stop button/automated system
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/panic_time(source, trigger_reason)
+ SIGNAL_HANDLER
+
+ if(!prereq_check())
+ return
+
+ send_warning(source, trigger_reason)
+
+/// Check for admin intervention or a fault in the signal validation, we don't exactly want to fire this on accident
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/prereq_check(source, trigger_reason)
+ if(on)
+ return FALSE
+
+ if(admin_disabled)
+ investigate_log("Delam SCRAM tried to activate but an admin disabled it", INVESTIGATE_ATMOS)
+ playsound(src, 'sound/misc/compiler-failure.ogg', 100, FALSE, MACHINE_SOUND_RANGE, ignore_walls = TRUE, use_reverb = TRUE, falloff_distance = MACHINE_SOUND_FALLOFF_DISTANCE)
+ radio.talk_into(src, "System fault! Unable to trigger.", warning_channel)
+ audible_message(span_danger("[src] makes a series of sad beeps. Someone has corrupted its software!"))
+ return FALSE
+
+ if(world.time - SSticker.round_start_time > 30 MINUTES && trigger_reason != DIVINE_INTERVENTION)
+ playsound(src, 'sound/misc/compiler-failure.ogg', 100, FALSE, MACHINE_SOUND_RANGE, ignore_walls = TRUE, use_reverb = TRUE, falloff_distance = MACHINE_SOUND_FALLOFF_DISTANCE)
+ audible_message(span_danger("[src] makes a series of sad beeps. The internal charge only lasts about 30 minutes... what a feat of engineering!"))
+ investigate_log("Delam SCRAM signal was received but failed precondition check. (Round time or trigger reason)", INVESTIGATE_ATMOS)
+ return FALSE
+
+ return TRUE
+
+/// Tells the station (they probably already know) and starts the procedure
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/send_warning(source, trigger_reason)
+ if(trigger_reason == DIVINE_INTERVENTION)
+ investigate_log("Delam SCRAM was activated by admin intervention", INVESTIGATE_ATMOS)
+ notify_ghosts(
+ "[src] has been activated!",
+ source = src,
+ header = "Divine Intervention",
+ action = NOTIFY_ORBIT,
+ ghost_sound = 'sound/machines/warning-buzzer.ogg',
+ notify_volume = 75,
+ )
+ else
+ var/reason
+ switch(trigger_reason)
+ if(AUTOMATIC_SAFETIES)
+ reason = "automatic safeties"
+ if(MANUAL_INTERVENTION)
+ reason = "manual intervention"
+
+ investigate_log("Delam SCRAM was activated by [reason]", INVESTIGATE_ATMOS)
+ // They're probably already deadchat engineering discussing what you did wrong
+ notify_ghosts(
+ "[src] has been activated!",
+ source = src,
+ header = "Mistakes Were Made",
+ action = NOTIFY_ORBIT,
+ ghost_sound = 'sound/machines/warning-buzzer.ogg',
+ notify_volume = 75,
+ )
+
+ radio.talk_into(src, "DELAMINATION SUPPRESSION SYSTEM FIRING IN 5 SECONDS. EVACUATE THE SUPERMATTER ENGINE ROOM!", emergency_channel)
+
+ // fight power with power
+ addtimer(CALLBACK(src, PROC_REF(put_on_a_show)), 5 SECONDS)
+ INVOKE_ASYNC(SSnightshift, TYPE_PROC_REF(/datum/controller/subsystem/nightshift, suck_light_power))
+
+/// Stop the delamination. Let the fireworks begin
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/put_on_a_show()
+ var/obj/machinery/power/supermatter_crystal/engine/angry_sm = my_sm?.resolve()
+ if(!angry_sm)
+ return
+
+ // Fire bell close, that nice 'are we gonna die?' rumble out far
+ on = TRUE
+ playsound(src, 'sound/machines/hypertorus/HFR_critical_explosion.ogg', 100, FALSE, MACHINE_RUMBLE_SOUND_RANGE, ignore_walls = TRUE, use_reverb = TRUE, falloff_distance = MACHINE_SOUND_FALLOFF_DISTANCE)
+ alert_sound_to_playing('sound/misc/earth_rumble_distant3.ogg', override_volume = TRUE)
+ update_appearance()
+
+ // Good job at kneecapping the crystal, engineers
+ // Make the crystal look cool (can escape a delam, but not puns)
+ angry_sm.modify_filter(name = "ray", new_params = list(
+ color = SUPERMATTER_TESLA_COLOUR,
+ ))
+ angry_sm.color = DAMAGED_SUPERMATTER_COLOR
+ angry_sm.set_light_color(SUPERMATTER_TESLA_COLOUR)
+ angry_sm.update_appearance()
+
+ // Don't vent the delam juice as it works its magic
+ for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/scrubby_boi in range(3, src))
+ scrubby_boi.on = FALSE
+ scrubby_boi.update_appearance()
+
+ for(var/obj/machinery/atmospherics/components/unary/vent_pump/venti_boi in range(3, src))
+ venti_boi.on = FALSE
+ venti_boi.update_appearance()
+
+ // The windows can only protect you for so long
+ for(var/obj/structure/window/reinforced/plasma/fucked_window in range(3, src))
+ addtimer(CALLBACK(fucked_window, TYPE_PROC_REF(/obj/structure/window/reinforced/plasma, shatter_window)), rand(SHATTER_MIN_TIME, SHATTER_MAX_TIME))
+
+ // Let the gas work for a few seconds to cool the crystal. If it has damage beyond repair, heal it a bit
+ addtimer(CALLBACK(src, PROC_REF(prevent_explosion)), 9 SECONDS)
+
+ // Restore the power that we were 'channelling' to the SM
+ addtimer(CALLBACK(SSnightshift, TYPE_PROC_REF(/datum/controller/subsystem/nightshift, restore_light_power)), rand(POWER_CUT_MIN_DURATION, POWER_CUT_MAX_DURATION))
+
+/// Shatter the supermatter chamber windows
+/obj/structure/window/reinforced/plasma/proc/shatter_window()
+ visible_message(span_danger("[src] shatters in the freon fire!"))
+ explosion(src, SHATTER_DEVASTATION_RANGE, SHATTER_HEAVY_RANGE, SHATTER_LIGHT_RANGE, SHATTER_FLAME_RANGE, SHATTER_FLASH_RANGE)
+ qdel(src)
+
+/// The valiant little machine falls apart, one time use only!
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/goodbye_friends()
+
+ // good job buddy, sacrificing yourself for the greater good
+ playsound(src, 'sound/misc/compiler-failure.ogg', 100, FALSE, MACHINE_SOUND_RANGE, ignore_walls = TRUE, use_reverb = TRUE, falloff_distance = MACHINE_SOUND_FALLOFF_DISTANCE)
+ visible_message(span_danger("[src] beeps a sorrowful melody and collapses into a pile of twisted metal and foam!"), blind_message = span_danger("[src] beeps a sorrowful melody!"))
+ deconstruct(FALSE)
+
+/// Drain the internal energy, if the crystal damage is above 100 we heal it a bit. Not much, but should be good to let them recover.
+/obj/machinery/atmospherics/components/unary/delam_scram/proc/prevent_explosion()
+ var/obj/machinery/power/supermatter_crystal/engine/damaged_sm = my_sm?.resolve()
+ if(!damaged_sm)
+ return
+
+ damaged_sm.name = "partially delaminated supermatter crystal"
+ damaged_sm.desc = "This crystal has seen better days, the glow seems off and the shards look brittle. Central says it's still \"relatively safe.\" They'd never lie to us, right?"
+ damaged_sm.explosion_power = SM_DAMAGED_EXPLOSION_POWER // if you fuck up again, yeesh
+
+ if(damaged_sm.damage > SM_PREVENT_EXPLOSION_THRESHOLD)
+ damaged_sm.damage = SM_PREVENT_EXPLOSION_THRESHOLD
+
+ damaged_sm.internal_energy = MISTAKES_WERE_MADE
+ for(var/obj/machinery/power/energy_accumulator/tesla_coil/zappy_boi in range(3, src))
+ zappy_boi.stored_energy = MISTAKES_WERE_MADE
+
+/obj/machinery/atmospherics/components/unary/delam_scram/New()
+ . = ..()
+ var/datum/gas_mixture/delam_juice = new
+ delam_juice.add_gases(/datum/gas/freon)
+ delam_juice.gases[/datum/gas/freon][MOLES] = SM_COOLING_MIXTURE_MOLES
+ delam_juice.temperature = SM_COOLING_MIXTURE_TEMP
+ airs[1] = delam_juice
+
+/// Dims the lights and consumes a bit of APC power, summoning that electricity to stop the delam... somehow
+/datum/controller/subsystem/nightshift/proc/suck_light_power()
+ SSnightshift.can_fire = FALSE
+ for(var/obj/machinery/power/apc/light_to_suck as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
+ light_to_suck.cell.charge -= DELAM_MACHINE_POWER_CONSUMPTION
+ light_to_suck.lighting = APC_CHANNEL_OFF
+ light_to_suck.nightshift_lights = TRUE
+ light_to_suck.update_appearance()
+ light_to_suck.update()
+
+/// Restores the lighting after the delam suppression
+/datum/controller/subsystem/nightshift/proc/restore_light_power()
+ SSnightshift.can_fire = TRUE
+ for(var/obj/machinery/power/apc/light_to_restore as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
+ light_to_restore.lighting = APC_CHANNEL_AUTO_ON
+ light_to_restore.update_appearance()
+ light_to_restore.update()
+
+/// A big red button you can smash to stop the supermatter engine, oh how tempting!
+/obj/machinery/button/delam_scram
+ name = "\improper supermatter emergency stop button"
+ desc = "Your last hope to try and save the crystal during a delamination.
\
+ While it is indeed a big red button, pressing it outside of an emergency \
+ will probably get the engineering department out for your blood."
+ icon = 'modular_skyrat/modules/delam_emergency_stop/icons/scram.dmi'
+ can_alter_skin = FALSE
+ silicon_access_disabled = TRUE
+ resistance_flags = FREEZE_PROOF | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
+ light_color = LIGHT_COLOR_INTENSE_RED
+ light_power = 0.7
+ ///one use only!
+ var/button_stage = BUTTON_IDLE
+ ///our internal radio
+ var/obj/item/radio/radio
+ ///radio key
+ var/radio_key = /obj/item/encryptionkey/headset_eng
+ COOLDOWN_DECLARE(scram_button)
+
+/obj/machinery/button/delam_scram/Initialize(mapload)
+ . = ..()
+ radio = new(src)
+ radio.keyslot = new radio_key
+ radio.set_listening(FALSE)
+ radio.recalculateChannels()
+
+/obj/machinery/button/delam_scram/Destroy()
+ QDEL_NULL(radio)
+ return ..()
+
+/obj/machinery/button/delam_scram/screwdriver_act(mob/living/user, obj/item/tool)
+ return TRUE
+
+/obj/machinery/button/delam_scram/emag_act(mob/user)
+ return
+
+/// Proc for arming the red button, it hasn't been pushed yet
+/obj/machinery/button/delam_scram/attack_hand(mob/user, list/modifiers)
+ . = ..()
+
+ if((machine_stat & BROKEN))
+ return
+
+ if(!COOLDOWN_FINISHED(src, scram_button))
+ balloon_alert(user, "on cooldown!")
+ return
+
+ if(!validate_suppression_status())
+ playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, FALSE, BUTTON_SOUND_RANGE, falloff_distance = BUTTON_SOUND_FALLOFF_DISTANCE)
+ audible_message(span_danger("[src] makes a sad buzz and goes dark. Did someone activate it already?")) // Look through the window, buddy
+ burn_out()
+ return
+
+ if(.)
+ return
+
+ // Give them a cheeky instructions card. But only one! If you lost it, question your engineering prowess in this moment
+ if(button_stage == BUTTON_IDLE)
+ visible_message(span_danger("A biscuit card falls out of [src]!"))
+ user.put_in_hands(new /obj/item/folder/biscuit/confidential/delam(get_turf(user)))
+ button_stage = BUTTON_AWAKE
+ return
+
+ if(button_stage != BUTTON_AWAKE)
+ return
+
+ COOLDOWN_START(src, scram_button, 15 SECONDS)
+
+ // For roundstart only, after that it's on you!
+ if(world.time - SSticker.round_start_time > 30 MINUTES)
+ playsound(src.loc, 'sound/misc/compiler-failure.ogg', 50, FALSE, BUTTON_SOUND_RANGE, falloff_distance = BUTTON_SOUND_FALLOFF_DISTANCE)
+ audible_message(span_danger("[src] makes a series of sad beeps. The internal charge only lasts about 30 minutes... what a feat of engineering! Looks like it's all on you to save the day."))
+ burn_out()
+ return
+
+ // You thought you could sneak this one by your coworkers?
+ button_stage = BUTTON_ARMED
+ update_appearance()
+ radio.talk_into(src, "SUPERMATTER EMERGENCY STOP BUTTON ARMED!", RADIO_CHANNEL_ENGINEERING)
+ visible_message(span_danger("[user] swings open the plastic cover on [src]!"))
+
+ // Let the admins know someone's fucked up
+ message_admins("[ADMIN_LOOKUPFLW(user)] just uncovered [src].")
+ investigate_log("[key_name(user)] uncovered [src].", INVESTIGATE_ATMOS)
+
+ confirm_action(user)
+
+/// Confirms with the user that they really want to push the red button. Do it, you won't!
+/obj/machinery/button/delam_scram/proc/confirm_action(mob/user, list/modifiers)
+ if(tgui_alert(usr, "Are you really sure that you want to push this?", "It looked scarier on HBO.", list("No", "Yes")) != "Yes")
+ button_stage = BUTTON_AWAKE
+ visible_message(span_danger("[user] slowly closes the plastic cover on [src]!"))
+ update_appearance()
+ return
+
+ // Make scary sound and flashing light
+ playsound(src, 'sound/machines/high_tech_confirm.ogg', 50, FALSE, BUTTON_SOUND_RANGE, ignore_walls = TRUE, use_reverb = TRUE, falloff_distance = BUTTON_SOUND_FALLOFF_DISTANCE)
+ button_stage = BUTTON_PUSHED
+ visible_message(span_danger("[user] smashes [src] with their hand!"))
+ message_admins("[ADMIN_LOOKUPFLW(user)] pushed [src]!")
+ investigate_log("[key_name(user)] pushed [src]!", INVESTIGATE_ATMOS)
+ flick_overlay_view("[base_icon_state]-overlay-active", 20 SECONDS)
+
+ // No going back now!
+ SEND_GLOBAL_SIGNAL(COMSIG_MAIN_SM_DELAMINATING, MANUAL_INTERVENTION)
+
+ // Temporarily let anyone escape the engine room before it becomes spicy
+ for(var/obj/machinery/door/airlock/escape_route in range(7, src))
+ if(istype(escape_route, /obj/machinery/door/airlock/command))
+ continue
+
+ INVOKE_ASYNC(escape_route, TYPE_PROC_REF(/obj/machinery/door/airlock, temp_emergency_exit), 45 SECONDS)
+
+/// When the button is pushed but it's too late to save you!
+/obj/machinery/button/delam_scram/proc/burn_out()
+ if(!(machine_stat & BROKEN))
+ src.desc += span_warning("The light is off, indicating it is not currently functional.")
+ set_machine_stat(machine_stat | BROKEN)
+ update_appearance()
+
+/obj/machinery/button/delam_scram/update_icon_state()
+ . = ..()
+ icon_state = "[base_icon_state][skin]"
+ if(button_stage == BUTTON_ARMED)
+ icon_state += "-armed"
+ else if(button_stage == BUTTON_PUSHED)
+ icon_state += "-armed"
+ else if(machine_stat & (NOPOWER|BROKEN))
+ icon_state += "-nopower"
+
+/obj/machinery/power/emitter/LateInitialize(mapload)
+ . = ..()
+ RegisterSignal(SSdcs, COMSIG_MAIN_SM_DELAMINATING, PROC_REF(emergency_stop))
+
+/obj/machinery/power/emitter/proc/emergency_stop()
+ SIGNAL_HANDLER
+
+ var/area/my_area = get_area(src)
+ if(!istype(my_area, /area/station/engineering))
+ return
+
+ active = FALSE
+ update_appearance()
+
+/obj/item/folder/biscuit/confidential/delam
+ name = "NT-approved delam emergency procedure"
+ contained_slip = /obj/item/paper/paperslip/corporate/fluff/delam_procedure
+ layer = SIGN_LAYER
+
+/obj/item/paper/paperslip/corporate/fluff/delam_procedure/Initialize(mapload)
+ name = "delam emergency procedure"
+ desc = "Now you're a REAL engineer!"
+ default_raw_text = "EMERGENCY PROCEDURE: SUPERMATTER DELAMINATION
\
+ So you've found yourself in a bit of a pickle with a delamination of a supermatter reactor.
Don't worry, saving the day is just a few steps away!
\
+ - Locate the ever-elusive red emergency stop button. It's probably hiding in plain sight, so take your time, have a laugh, and enjoy the anticipation. Remember, it's like a treasure hunt, only with the added bonus of preventing a nuclear disaster.
\
+ - Once you've uncovered the button, muster all your courage and push it like there's no tomorrow. Well, actually, you're pushing it to ensure there is a tomorrow. But hey, who doesn't love a little paradoxical button-pushing?
\
+ - Prepare for the impending suppression of the supermatter engine room, because things are about to get real quiet. Just make sure everyone has evacuated, or else they'll be in for a surprise. The system needs its space, and it's not known for being the friendliest neighbour.
\
+ - After the delamination is successfully suppressed, take a moment to appreciate the delicate beauty of crystal-based electricity. Take a look around and fix any damage to those fragile glass components. Feel free to put on your finest overalls and channel your inner engiborg while doing so.
\
+ - Keep an eye out for fires and the infamous air mix. It's always an adventure trying to strike the perfect balance between breathable air and potential suffocation. Remember, oxygen plus a spark equals fireworks – the kind you definitely don't want inside a reactor.
\
+ - To avoid singeing your eyebrows off, consider enlisting the help of a synth or a trusty borg. After all, nothing says \"safety first\" like outsourcing your firefighting to non-living, non-breathing assistants.
\
+ - Clear out any lightly radioactive debris (The cargo department will probably love to dispose it for you.)
\
+ - Finally, revel in the satisfaction of knowing that you've single-handedly prevented a delamination. But, of course, don't forget to feel guilty because SAFETY MOTH Knows. SAFETY MOTH knows everything. It's always watching, judging, and probably taking notes for its next safety briefing. So bask in the glory of your heroism, but know that the all-knowing Moff is onto you.
\
+ (Optional step, for the true daredevils out there)
\
+ - When it comes time for your second attempt at starting the SM: Fold these instructions into a paper plane, give it a good toss towards the crystal, and watch it soar through the air. Because nothing says \"I'm dealing with a potentially catastrophic situation\" like engaging in some whimsical paper airplane shenanigans.
\
+ Hopefully you'll never need to use this. However, good luck!"
+ return ..()
+
+MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/atmospherics/components/unary/delam_scram, 0)
+
+#undef DELAM_MACHINE_POWER_CONSUMPTION
+#undef DAMAGED_SUPERMATTER_COLOR
+#undef SM_PREVENT_EXPLOSION_THRESHOLD
+#undef SM_COOLING_MIXTURE_MOLES
+#undef SM_COOLING_MIXTURE_TEMP
+#undef MISTAKES_WERE_MADE
+#undef MANUAL_INTERVENTION
+#undef AUTOMATIC_SAFETIES
+#undef BUTTON_PUSHED
+#undef BUTTON_IDLE
+#undef BUTTON_AWAKE
+#undef BUTTON_ARMED
+#undef SM_DAMAGED_EXPLOSION_POWER
+#undef SHATTER_DEVASTATION_RANGE
+#undef SHATTER_HEAVY_RANGE
+#undef SHATTER_LIGHT_RANGE
+#undef SHATTER_FLAME_RANGE
+#undef SHATTER_FLASH_RANGE
+#undef SHATTER_MIN_TIME
+#undef SHATTER_MAX_TIME
+#undef POWER_CUT_MIN_DURATION
+#undef POWER_CUT_MAX_DURATION
+#undef AIR_INJECT_RATE
+#undef BUTTON_SOUND_RANGE
+#undef BUTTON_SOUND_FALLOFF_DISTANCE
+#undef MACHINE_SOUND_RANGE
+#undef MACHINE_RUMBLE_SOUND_RANGE
+#undef MACHINE_SOUND_FALLOFF_DISTANCE
diff --git a/modular_skyrat/modules/delam_emergency_stop/icons/scram.dmi b/modular_skyrat/modules/delam_emergency_stop/icons/scram.dmi
new file mode 100644
index 00000000000..8828ba8410b
Binary files /dev/null and b/modular_skyrat/modules/delam_emergency_stop/icons/scram.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index b9c52ab31f9..025c88c928c 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -6493,6 +6493,9 @@
#include "modular_skyrat\modules\decay_subsystem\code\decaySS.dm"
#include "modular_skyrat\modules\decay_subsystem\code\nests.dm"
#include "modular_skyrat\modules\decay_subsystem\code\spawn_nest.dm"
+#include "modular_skyrat\modules\delam_emergency_stop\code\admin_scram.dm"
+#include "modular_skyrat\modules\delam_emergency_stop\code\delam.dm"
+#include "modular_skyrat\modules\delam_emergency_stop\code\scram.dm"
#include "modular_skyrat\modules\departmentization\cargo_technician.dm"
#include "modular_skyrat\modules\departmentization\clothing_overrides.dm"
#include "modular_skyrat\modules\departmentization\quartermaster.dm"