Skip to content

Commit

Permalink
ARES Apollo Check proc
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 committed Dec 21, 2023
1 parent 98a3b6f commit 0095d9e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,20 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
return TRUE
return FALSE //CPU not found or is broken

/proc/log_ares_apollo(speaker, message)
if(!ares_can_log())
/proc/ares_can_apollo()
if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore))
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()){
return FALSE
}
if(!speaker)
speaker = "Unknown"
var/datum/ares_datacore/datacore = GLOB.ares_datacore
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES_step_triggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
broadcast_message = "ALERT: Unauthorized movement detected in [area_name]!"

var/datum/ares_link/link = GLOB.ares_link
if(link.processor_apollo.inoperable())
if(!ares_can_apollo())
return FALSE

to_chat(passer, SPAN_BOLDWARNING("You hear a soft beeping sound as you cross the threshold."))
Expand Down Expand Up @@ -154,7 +154,7 @@
var/broadcast_message = get_broadcast(passer, idcard, failure)

var/datum/ares_link/link = GLOB.ares_link
if(link.processor_apollo.inoperable())
if(!ares_can_apollo())
return FALSE

to_chat(passer, SPAN_BOLDWARNING("You hear a harsh buzzing sound as you cross the threshold!"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
return FALSE

var/datum/ares_link/link = GLOB.ares_link
if(link.processor_apollo.inoperable())
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")
to_chat(usr, SPAN_WARNING("[MAIN_AI_SYSTEM] is not responding. It's APOLLO processor may be offline or destroyed."))
Expand Down

0 comments on commit 0095d9e

Please sign in to comment.