diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 308bc4fb818..01b27018972 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -368,18 +368,8 @@ uses = 1 /datum/action/innate/ai/lockdown/Activate() - for(var/obj/machinery/door/D in GLOB.airlocks) - if(!is_station_level(D.z)) - continue - INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown, owner) - addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 900) - - post_status("alert", "lockdown") - - GLOB.minor_announcement.Announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.", "Network Alert") to_chat(owner, "Lockdown Initiated. Network reset in 90 seconds.") - spawn(900) - GLOB.minor_announcement.Announce("Automatic system reboot complete. Have a secure day.","Network reset:") + new /datum/event/door_runtime() //Destroy RCDs: Detonates all non-cyborg RCDs on the station. /datum/AI_Module/large/destroy_rcd diff --git a/code/modules/events/door_runtime.dm b/code/modules/events/door_runtime.dm new file mode 100644 index 00000000000..39e02e694db --- /dev/null +++ b/code/modules/events/door_runtime.dm @@ -0,0 +1,16 @@ +/datum/event/door_runtime + +/datum/event/door_runtime/announce() + GLOB.minor_announcement.Announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.", "Network Alert") + +/datum/event/door_runtime/start() + for(var/obj/machinery/door/D in GLOB.airlocks) + if(!is_station_level(D.z)) + continue + INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown) + addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 90 SECONDS) + addtimer(CALLBACK(src, .proc/reboot), 90 SECONDS) + post_status("alert", "lockdown") + +/datum/event/door_runtime/proc/reboot() + GLOB.minor_announcement.Announce("Automatic system reboot complete. Have a secure day.","Network reset:") diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 6eee71921b9..11c63f0a257 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -182,7 +182,8 @@ GLOBAL_LIST_EMPTY(event_last_fired) new /datum/event_meta(EVENT_LEVEL_MODERATE, "Swarmer Spawn", /datum/event/spawn_swarmer, 150, is_one_shot = TRUE), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 40, list(ASSIGNMENT_SECURITY = 10), is_one_shot = TRUE), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, 0, list(ASSIGNMENT_MEDICAL = 150), TRUE), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Headcrabs", /datum/event/headcrabs, 0, list(ASSIGNMENT_SECURITY = 20)) + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Headcrabs", /datum/event/headcrabs, 0, list(ASSIGNMENT_SECURITY = 20)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Door Runtime", /datum/event/door_runtime, 50, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_AI = 150), TRUE) ) /datum/event_container/major diff --git a/paradise.dme b/paradise.dme index 49361d16747..d1a011e86b2 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1477,6 +1477,7 @@ #include "code\modules\events\carp_migration.dm" #include "code\modules\events\communications_blackout.dm" #include "code\modules\events\disease_outbreak.dm" +#include "code\modules\events\door_runtime.dm" #include "code\modules\events\dust.dm" #include "code\modules\events\electrical_storm.dm" #include "code\modules\events\event.dm"