diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index f952ec942ec..8cc5256ed9e 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -60,3 +60,5 @@ GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ GLOBAL_VAR(genname) //Nanotrasen officer name for fax send via fax panel, randoms every round GLOBAL_VAR_INIT(pacifism_after_gt, FALSE) + +GLOBAL_VAR_INIT(communications_blackout, FALSE) diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index 1de0ec03099..aa753915435 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -15,9 +15,16 @@ GLOB.event_announcement.Announce(alert) /datum/event/communications_blackout/start() + var/time = rand(1800, 3000) // This only affects the cores, relays should be unaffected imo for(var/obj/machinery/tcomms/core/T in GLOB.tcomms_machines) T.start_ion() // Bring it back sometime between 3-5 minutes. This uses deciseconds, so 1800 and 3000 respecticely. // The AI cannot disable this, it must be waited for - addtimer(CALLBACK(T, TYPE_PROC_REF(/obj/machinery/tcomms, end_ion)), rand(1800, 3000)) + addtimer(CALLBACK(T, TYPE_PROC_REF(/obj/machinery/tcomms, end_ion)), time) + addtimer(CALLBACK(src, PROC_REF(toggle_monitors)), time) + GLOB.communications_blackout = TRUE + +/datum/event/communications_blackout/proc/toggle_monitors() + GLOB.communications_blackout = FALSE + return diff --git a/code/modules/tgui/modules/crew_monitor.dm b/code/modules/tgui/modules/crew_monitor.dm index 69539d96ca4..3bffa31ce91 100644 --- a/code/modules/tgui/modules/crew_monitor.dm +++ b/code/modules/tgui/modules/crew_monitor.dm @@ -23,6 +23,13 @@ /datum/ui_module/crew_monitor/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + + if(GLOB.communications_blackout) + to_chat(user, span_warning("Monitor shows strange symbols. There is no useful information, because of noise.")) + if(ui) + ui.close() + return + if(!ui) ui = new(user, src, ui_key, "CrewMonitor", name, 800, 600, master_ui, state)