From fd09d2534c1afa23900a406410ac226596c736d1 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 21 Dec 2023 19:27:16 -0500 Subject: [PATCH] Ares Death Consequence --- code/game/bioscans.dm | 2 +- code/game/machinery/ARES/ARES_procs.dm | 18 +++++++++++------- code/modules/admin/tabs/event_tab.dm | 1 - 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/code/game/bioscans.dm b/code/game/bioscans.dm index ff6e00ec430e..50bcab969443 100644 --- a/code/game/bioscans.dm +++ b/code/game/bioscans.dm @@ -111,7 +111,7 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new) /datum/bioscan_data/proc/ares_can_bioscan() var/datum/ares_link/link = GLOB.ares_link - if(!istype(link)) + if(!istype(link) || !ares_is_active()) return FALSE if(link.processor_bioscan && !link.processor_bioscan.inoperable()) return TRUE diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm index 109058dba3c6..af09d9cc2763 100644 --- a/code/game/machinery/ARES/ARES_procs.dm +++ b/code/game/machinery/ARES/ARES_procs.dm @@ -77,6 +77,13 @@ GLOBAL_LIST_INIT(maintenance_categories, list( // ------ ARES Logging Procs ------ // +/proc/ares_is_active(){ + for(var/mob/living/silicon/decoy/ship_ai/ai in GLOB.ai_mob_list) + if(ai.stat == DEAD) + return FALSE //ARES dead, most other systems also die with it + return TRUE +} + /proc/ares_apollo_talk(broadcast_message) var/datum/language/apollo/apollo = GLOB.all_languages[LANGUAGE_APOLLO] for(var/mob/living/silicon/decoy/ship_ai/ai in GLOB.ai_mob_list) @@ -89,14 +96,14 @@ GLOBAL_LIST_INIT(maintenance_categories, list( /proc/ares_can_interface() var/obj/structure/machinery/ares/processor/interface/processor = GLOB.ares_link.processor_interface - if(!istype(GLOB.ares_link)) + if(!istype(GLOB.ares_link) || !ares_is_active()) return FALSE if(processor && !processor.inoperable()) return TRUE return FALSE //interface processor not found or is broken /proc/ares_can_log() - if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore)) + if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore) || !ares_is_active()) return FALSE var/obj/structure/machinery/ares/cpu/central_processor = GLOB.ares_link.central_processor if(central_processor && !central_processor.inoperable()) @@ -104,7 +111,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list( return FALSE //CPU not found or is broken /proc/ares_can_apollo() - if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore)) + if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore) || !ares_is_active()) return FALSE var/datum/ares_link/link = GLOB.ares_link if(!link.processor_apollo || link.processor_apollo.inoperable()) @@ -112,11 +119,8 @@ GLOBAL_LIST_INIT(maintenance_categories, list( return TRUE /proc/log_ares_apollo(speaker, message) - if(!ares_can_log()) - return FALSE - if(!ares_can_apollo()){ + if(!ares_can_log() || !ares_can_apollo()) return FALSE - } if(!speaker) speaker = "Unknown" var/datum/ares_datacore/datacore = GLOB.ares_datacore diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 477a6c0144f0..9f6d8586262e 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -597,7 +597,6 @@ if(!input) return FALSE - var/datum/ares_link/link = GLOB.ares_link if(!ares_can_apollo()) var/prompt = tgui_alert(src, "ARES APOLLO processor is offline or destroyed, send the message anyways?", "Choose.", list("Yes", "No"), 20 SECONDS) if(prompt != "Yes")