Skip to content

Commit

Permalink
Ares Death Consequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 committed Dec 22, 2023
1 parent 0095d9e commit fd09d25
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion code/game/bioscans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 11 additions & 7 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -89,34 +96,31 @@ 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())
return TRUE
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())
return FALSE
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
Expand Down
1 change: 0 additions & 1 deletion code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit fd09d25

Please sign in to comment.