diff --git a/code/defines/procs/announcement.dm b/code/defines/procs/announcement.dm
index 5223d63b8e59..574c06e436a2 100644
--- a/code/defines/procs/announcement.dm
+++ b/code/defines/procs/announcement.dm
@@ -45,13 +45,13 @@
if((H.faction != faction_to_display && !add_PMCs) || (H.faction != faction_to_display && add_PMCs && !(H.faction in FACTION_LIST_WY)) && !(faction_to_display in H.faction_group)) //faction checks
targets.Remove(H)
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
- link.log_ares_announcement(title, message)
+ datacore.log_ares_announcement(title, message)
if(ARES_LOG_SECURITY)
- link.log_ares_security(title, message)
+ datacore.log_ares_security(title, message)
else if(faction_to_display == "Everyone (-Yautja)")
for(var/mob/M in targets)
@@ -98,13 +98,13 @@
for(var/mob/living/silicon/decoy/ship_ai/AI in ai_mob_list)
INVOKE_ASYNC(AI, TYPE_PROC_REF(/mob/living/silicon/decoy/ship_ai, say), message)
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
- link.log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
+ datacore.log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
if(ARES_LOG_SECURITY)
- link.log_ares_security("[MAIN_AI_SYSTEM] Security Update", message)
+ datacore.log_ares_security("[MAIN_AI_SYSTEM] Security Update", message)
/proc/ai_silent_announcement(message, channel_prefix, bypass_cooldown = FALSE)
if(!message)
@@ -135,9 +135,9 @@
if(!isnull(signature))
message += "
Signed by,
[signature]"
- var/datum/ares_link/link = GLOB.ares_link
- if(link.interface && !(link.interface.inoperable()))
- link.log_ares_announcement(title, message)
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_announcement(title, message)
announcement_helper(message, title, targets, sound_to_play)
@@ -150,9 +150,9 @@
if(!ishuman(T) || isyautja(T) || !is_mainship_level(T.z))
targets.Remove(T)
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
if(ares_can_log())
- link.log_ares_announcement("[title] Shipwide Update", message)
+ datacore.log_ares_announcement("[title] Shipwide Update", message)
announcement_helper(message, title, targets, sound_to_play)
diff --git a/code/game/bioscans.dm b/code/game/bioscans.dm
index 62c801a02d29..d3170a06c557 100644
--- a/code/game/bioscans.dm
+++ b/code/game/bioscans.dm
@@ -109,24 +109,23 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
to_chat(ghost, ghost_scan)
-/// This will do something after Project ARES.
/datum/bioscan_data/proc/ares_can_bioscan()
var/datum/ares_link/link = GLOB.ares_link
if(!istype(link))
return FALSE
- if(link.p_bioscan && !link.p_bioscan.inoperable())
+ if(link.processor_bioscan && !link.processor_bioscan.inoperable())
return TRUE
return FALSE
/// The announcement to all Humans. Slightly off for the planet and elsewhere, accurate for the ship.
/datum/bioscan_data/proc/ares_bioscan(forced = FALSE, variance = 2)
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
if(!forced && !ares_can_bioscan())
message_admins("An ARES Bioscan has failed.")
var/name = "[MAIN_AI_SYSTEM] Bioscan Status"
var/input = "Bioscan failed. \n\nInvestigation into Bioscan subsystem recommended."
if(ares_can_log())
- link.log_ares_bioscan(name, input)
+ datacore.log_ares_bioscan(name, input)
if(ares_can_interface())
marine_announcement(input, name, 'sound/misc/interference.ogg', logging = ARES_LOG_NONE)
return
@@ -138,7 +137,7 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
log_game("BIOSCAN: ARES bioscan completed. [input]")
if(forced || ares_can_log())
- link.log_ares_bioscan(name, input) //if interface is down, bioscan still logged, just have to go read it.
+ datacore.log_ares_bioscan(name, input) //if interface is down, bioscan still logged, just have to go read it.
if(forced || ares_can_interface())
marine_announcement(input, name, 'sound/AI/bioscan.ogg', logging = ARES_LOG_NONE)
else
diff --git a/code/game/machinery/ARES/ARES.dm b/code/game/machinery/ARES/ARES.dm
index ed4391c89c24..1ecbb4a5d7d6 100644
--- a/code/game/machinery/ARES/ARES.dm
+++ b/code/game/machinery/ARES/ARES.dm
@@ -8,7 +8,6 @@
unslashable = TRUE
unacidable = TRUE
- var/link_id = MAIN_SHIP_DEFAULT_NAME
var/datum/ares_link/link
/obj/structure/machinery/ares/ex_act(severity)
@@ -40,14 +39,12 @@
log_debug("Error: link_systems called without a link datum")
if(link && !override)
return FALSE
- if(new_link.link_id == link_id)
+ if(new_link)
link = new_link
- log_debug("[name] linked to Ares Link [link_id]")
new_link.linked_systems += src
return TRUE
/obj/structure/machinery/ares/proc/delink()
- log_debug("[name] delinked from Ares Link [link.link_id]")
link.linked_systems -= src
link = null
@@ -63,11 +60,11 @@
/obj/structure/machinery/ares/processor/apollo/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
..()
- new_link.p_apollo = src
+ new_link.processor_apollo = src
/obj/structure/machinery/ares/processor/apollo/delink()
- if(link && link.p_apollo == src)
- link.p_apollo = null
+ if(link && link.processor_apollo == src)
+ link.processor_apollo = null
..()
/obj/structure/machinery/ares/processor/interface
@@ -77,11 +74,11 @@
/obj/structure/machinery/ares/processor/interface/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
..()
- new_link.p_interface = src
+ new_link.processor_interface = src
/obj/structure/machinery/ares/processor/interface/delink()
- if(link && link.p_interface == src)
- link.p_interface = null
+ if(link && link.processor_interface == src)
+ link.processor_interface = null
..()
/obj/structure/machinery/ares/processor/bioscan
@@ -91,11 +88,11 @@
/obj/structure/machinery/ares/processor/bioscan/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
..()
- new_link.p_bioscan = src
+ new_link.processor_bioscan = src
/obj/structure/machinery/ares/processor/bioscan/delink()
- if(link && link.p_bioscan == src)
- link.p_bioscan = null
+ if(link && link.processor_bioscan == src)
+ link.processor_bioscan = null
..()
/// Central Core
@@ -104,130 +101,17 @@
desc = "This is ARES' central processor. Made of a casing designed to withstand nuclear blasts, the CPU also contains ARES' blackbox recorder."
icon_state = "CPU"
+/obj/structure/machinery/ares/cpu/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
+ ..()
+ new_link.central_processor = src
+
+/obj/structure/machinery/ares/cpu/delink()
+ if(link && link.central_processor == src)
+ link.central_processor = null
+ ..()
+
/// Memory Substrate,
/obj/structure/machinery/ares/substrate
name = "ARES Substrate"
desc = "The memory substrate of ARES, containing complex protocols and information. Limited capabilities can operate on substrate alone, without the main ARES Unit operational."
icon_state = "substrate"
-
-// #################### ARES Interface Console #####################
-/obj/structure/machinery/computer/ares_console
- name = "ARES Interface"
- desc = "A console built to interface with ARES, allowing for 1:1 communication."
- icon = 'icons/obj/structures/machinery/ares.dmi'
- icon_state = "console"
- exproof = TRUE
-
- var/current_menu = "login"
- var/last_menu = ""
-
- var/authentication = ARES_ACCESS_BASIC
-
- /// The last person to login.
- var/last_login
- /// The person pretending to be last_login
- var/sudo_holder
- /// A record of who logged in and when.
- var/list/access_list = list()
-
- /// The ID used to link all devices.
- var/link_id = MAIN_SHIP_DEFAULT_NAME
- var/datum/ares_link/link
-
- /// The current deleted chat log of 1:1 conversations being read.
- var/list/deleted_1to1 = list()
-
- /// Holds all (/datum/ares_record/announcement)s
- var/list/records_announcement = list()
- /// Holds all (/datum/ares_record/bioscan)s
- var/list/records_bioscan = list()
- /// Holds all (/datum/ares_record/bombardment)s
- var/list/records_bombardment = list()
- /// Holds all (/datum/ares_record/deletion)s
- var/list/records_deletion = list()
- /// Holds all (/datum/ares_record/talk_log)s
- var/list/records_talking = list()
- /// Holds all (/datum/ares_record/requisition_log)s
- var/list/records_asrs = list()
- /// Holds all (/datum/ares_record/security)s (including AA)
- var/list/records_security = list()
- /// Holds all (/datum/ares_record/flight)s
- var/list/records_flight = list()
- /// Is nuke request usable or not?
- var/nuke_available = TRUE
-
-
- COOLDOWN_DECLARE(ares_distress_cooldown)
- COOLDOWN_DECLARE(ares_nuclear_cooldown)
- COOLDOWN_DECLARE(ares_quarters_cooldown)
-
-/obj/structure/machinery/computer/ares_console/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
- if(link && !override)
- return FALSE
- if(new_link.link_id == link_id)
- new_link.interface = src
- link = new_link
- log_debug("[name] linked to Ares Link [link_id]")
- new_link.linked_systems += src
- return TRUE
-
-/obj/structure/machinery/computer/ares_console/Initialize(mapload, ...)
- link_systems(override = FALSE)
- . = ..()
-
-/obj/structure/machinery/computer/ares_console/proc/delink()
- if(link && link.interface == src)
- link.interface = null
- link.linked_systems -= src
- link = null
-
-/obj/structure/machinery/computer/ares_console/Destroy()
- delink()
- return ..()
-
-// #################### Working Joe Ticket Console #####################
-/obj/structure/machinery/computer/working_joe
- name = "APOLLO Maintenance Controller"
- desc = "A console built to facilitate Working Joes and their operation, allowing for simple allocation of resources."
- icon = 'icons/obj/structures/machinery/ares.dmi'
- icon_state = "console"
- exproof = TRUE
-
- /// The ID used to link all devices.
- var/link_id = MAIN_SHIP_DEFAULT_NAME
- var/datum/ares_link/link
- var/obj/structure/machinery/ares/processor/interface/processor
-
- var/current_menu = "login"
- var/last_menu = ""
-
- var/authentication = ARES_ACCESS_BASIC
- /// The last person to login.
- var/last_login
- /// A record of who logged in and when.
- var/list/login_list = list()
-
-
-/obj/structure/machinery/computer/working_joe/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
- if(link && !override)
- return FALSE
- if(new_link.link_id == link_id)
- new_link.ticket_computers += src
- link = new_link
- log_debug("[name] linked to Ares Link [link_id]")
- new_link.linked_systems += src
- return TRUE
-
-/obj/structure/machinery/computer/working_joe/Initialize(mapload, ...)
- link_systems(override = FALSE)
- . = ..()
-
-/obj/structure/machinery/computer/working_joe/proc/delink()
- if(link)
- link.ticket_computers -= src
- link.linked_systems -= src
- link = null
-
-/obj/structure/machinery/computer/working_joe/Destroy()
- delink()
- return ..()
diff --git a/code/game/machinery/ARES/ARES_interface.dm b/code/game/machinery/ARES/ARES_interface.dm
new file mode 100644
index 000000000000..41f4c4a38f07
--- /dev/null
+++ b/code/game/machinery/ARES/ARES_interface.dm
@@ -0,0 +1,472 @@
+// #################### ARES Interface Console #####################
+/obj/structure/machinery/computer/ares_console
+ name = "ARES Interface"
+ desc = "A console built to interface with ARES, allowing for 1:1 communication."
+ icon = 'icons/obj/structures/machinery/ares.dmi'
+ icon_state = "console"
+ exproof = TRUE
+
+ var/current_menu = "login"
+ var/last_menu = ""
+
+ var/authentication = ARES_ACCESS_BASIC
+
+ /// The last person to login.
+ var/last_login
+ /// The person pretending to be last_login
+ var/sudo_holder
+
+ /// The current deleted chat log of 1:1 conversations being read.
+ var/list/deleted_1to1 = list()
+
+ /// The ID used to link all devices.
+ var/datum/ares_link/link
+ /// The datacore storing all the information.
+ var/datum/ares_datacore/datacore
+
+/obj/structure/machinery/computer/ares_console/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
+ if(link && !override)
+ return FALSE
+ if(new_link)
+ new_link.interface = src
+ link = new_link
+ new_link.linked_systems += src
+ if(!datacore)
+ datacore = GLOB.ares_datacore
+ return TRUE
+
+/obj/structure/machinery/computer/ares_console/Initialize(mapload, ...)
+ link_systems(override = FALSE)
+ . = ..()
+
+/obj/structure/machinery/computer/ares_console/proc/delink()
+ if(link)
+ if(link.interface == src)
+ link.interface = null
+ link.linked_systems -= src
+ link = null
+ datacore = null
+
+/obj/structure/machinery/computer/ares_console/Destroy()
+ delink()
+ return ..()
+
+// ------ ARES Interface UI ------ //
+
+/obj/structure/machinery/computer/ares_console/attack_hand(mob/user as mob)
+ if(..() || !allowed(usr) || inoperable())
+ return FALSE
+
+ tgui_interact(user)
+ return TRUE
+
+/obj/structure/machinery/computer/ares_console/tgui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "AresInterface", name)
+ ui.open()
+
+/obj/structure/machinery/computer/ares_console/ui_data(mob/user)
+ var/list/data = list()
+
+ data["current_menu"] = current_menu
+ data["last_page"] = last_menu
+
+ data["logged_in"] = last_login
+ data["sudo"] = sudo_holder ? TRUE : FALSE
+
+ data["access_text"] = "[sudo_holder ? "(SUDO)," : ""] access level [authentication], [ares_auth_to_text(authentication)]."
+ data["access_level"] = authentication
+
+ data["alert_level"] = security_level
+ data["evac_status"] = EvacuationAuthority.evac_status
+ data["worldtime"] = world.time
+
+ data["access_log"] = datacore.interface_access_list
+ data["apollo_log"] = datacore.apollo_log
+
+ data["deleted_conversation"] = deleted_1to1
+
+ data["distresstime"] = datacore.ares_distress_cooldown
+ data["distresstimelock"] = DISTRESS_TIME_LOCK
+ data["quarterstime"] = datacore.ares_quarters_cooldown
+ data["mission_failed"] = SSticker.mode.is_in_endgame
+ data["nuketimelock"] = NUCLEAR_TIME_LOCK
+ data["nuke_available"] = datacore.nuke_available
+
+ var/list/logged_announcements = list()
+ for(var/datum/ares_record/announcement/broadcast as anything in datacore.records_announcement)
+ var/list/current_broadcast = list()
+ current_broadcast["time"] = broadcast.time
+ current_broadcast["title"] = broadcast.title
+ current_broadcast["details"] = broadcast.details
+ current_broadcast["ref"] = "\ref[broadcast]"
+ logged_announcements += list(current_broadcast)
+ data["records_announcement"] = logged_announcements
+
+ var/list/logged_alerts = list()
+ for(var/datum/ares_record/security/security_alert as anything in datacore.records_security)
+ var/list/current_alert = list()
+ current_alert["time"] = security_alert.time
+ current_alert["title"] = security_alert.title
+ current_alert["details"] = security_alert.details
+ current_alert["ref"] = "\ref[security_alert]"
+ logged_alerts += list(current_alert)
+ data["records_security"] = logged_alerts
+
+ var/list/logged_flights = list()
+ for(var/datum/ares_record/flight/flight_log as anything in datacore.records_flight)
+ var/list/current_flight = list()
+ current_flight["time"] = flight_log.time
+ current_flight["title"] = flight_log.title
+ current_flight["details"] = flight_log.details
+ current_flight["user"] = flight_log.user
+ current_flight["ref"] = "\ref[flight_log]"
+ logged_flights += list(current_flight)
+ data["records_flight"] = logged_flights
+
+ var/list/logged_bioscans = list()
+ for(var/datum/ares_record/bioscan/scan as anything in datacore.records_bioscan)
+ var/list/current_scan = list()
+ current_scan["time"] = scan.time
+ current_scan["title"] = scan.title
+ current_scan["details"] = scan.details
+ current_scan["ref"] = "\ref[scan]"
+ logged_bioscans += list(current_scan)
+ data["records_bioscan"] = logged_bioscans
+
+ var/list/logged_bombs = list()
+ for(var/datum/ares_record/bombardment/bomb as anything in datacore.records_bombardment)
+ var/list/current_bomb = list()
+ current_bomb["time"] = bomb.time
+ current_bomb["title"] = bomb.title
+ current_bomb["details"] = bomb.details
+ current_bomb["user"] = bomb.user
+ current_bomb["ref"] = "\ref[bomb]"
+ logged_bombs += list(current_bomb)
+ data["records_bombardment"] = logged_bombs
+
+ var/list/logged_deletes = list()
+ for(var/datum/ares_record/deletion/deleted as anything in datacore.records_deletion)
+ if(!istype(deleted))
+ continue
+ var/list/current_delete = list()
+ current_delete["time"] = deleted.time
+ current_delete["title"] = deleted.title
+ current_delete["details"] = deleted.details
+ current_delete["user"] = deleted.user
+ current_delete["ref"] = "\ref[deleted]"
+ logged_deletes += list(current_delete)
+ data["records_deletion"] = logged_deletes
+
+ var/list/logged_discussions = list()
+ for(var/datum/ares_record/deleted_talk/deleted_convo as anything in datacore.records_deletion)
+ if(!istype(deleted_convo))
+ continue
+ var/list/deleted_disc = list()
+ deleted_disc["time"] = deleted_convo.time
+ deleted_disc["title"] = deleted_convo.title
+ deleted_disc["ref"] = "\ref[deleted_convo]"
+ logged_discussions += list(deleted_disc)
+ data["deleted_discussions"] = logged_discussions
+
+ var/list/logged_orders = list()
+ for(var/datum/ares_record/requisition_log/req_order as anything in datacore.records_asrs)
+ if(!istype(req_order))
+ continue
+ var/list/current_order = list()
+ current_order["time"] = req_order.time
+ current_order["details"] = req_order.details
+ current_order["title"] = req_order.title
+ current_order["user"] = req_order.user
+ current_order["ref"] = "\ref[req_order]"
+ logged_orders += list(current_order)
+ data["records_requisition"] = logged_orders
+
+ var/list/logged_convos = list()
+ var/list/active_convo = list()
+ var/active_ref
+ for(var/datum/ares_record/talk_log/log as anything in datacore.records_talking)
+ if(!istype(log))
+ continue
+ if(log.user == last_login)
+ active_convo = log.conversation
+ active_ref = "\ref[log]"
+
+ var/list/current_convo = list()
+ current_convo["user"] = log.user
+ current_convo["ref"] = "\ref[log]"
+ current_convo["conversation"] = log.conversation
+ logged_convos += list(current_convo)
+
+ data["active_convo"] = active_convo
+ data["active_ref"] = active_ref
+ data["conversations"] = logged_convos
+
+ return data
+
+/obj/structure/machinery/computer/ares_console/ui_status(mob/user, datum/ui_state/state)
+ . = ..()
+ if(!allowed(user))
+ return UI_UPDATE
+ if(inoperable())
+ return UI_DISABLED
+
+/obj/structure/machinery/computer/ares_console/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
+ . = ..()
+ if(.)
+ return
+
+ playsound(src, "keyboard_alt", 15, 1)
+
+ switch (action)
+ if("go_back")
+ if(!last_menu)
+ return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
+ var/temp_holder = current_menu
+ current_menu = last_menu
+ last_menu = temp_holder
+
+ if("login")
+ var/mob/living/carbon/human/operator = usr
+ var/obj/item/card/id/idcard = operator.get_active_hand()
+ if(istype(idcard))
+ authentication = get_ares_access(idcard)
+ last_login = idcard.registered_name
+ else if(operator.wear_id)
+ idcard = operator.wear_id
+ if(istype(idcard))
+ authentication = get_ares_access(idcard)
+ last_login = idcard.registered_name
+ else
+ to_chat(usr, SPAN_WARNING("You require an ID card to access this terminal!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(authentication)
+ datacore.interface_access_list += "[last_login] at [worldtime2text()], Access Level [authentication] - [ares_auth_to_text(authentication)]."
+ current_menu = "main"
+
+ if("sudo")
+ var/new_user = tgui_input_text(usr, "Enter Sudo Username", "Sudo User", encode = FALSE)
+ if(new_user)
+ if(new_user == sudo_holder)
+ last_login = sudo_holder
+ sudo_holder = null
+ return FALSE
+ if(new_user == last_login)
+ to_chat(usr, SPAN_WARNING("Already remote logged in as this user."))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ sudo_holder = last_login
+ last_login = new_user
+ datacore.interface_access_list += "[last_login] at [worldtime2text()], Sudo Access."
+ return TRUE
+ if("sudo_logout")
+ datacore.interface_access_list += "[last_login] at [worldtime2text()], Sudo Logout."
+ last_login = sudo_holder
+ sudo_holder = null
+ return
+ // -- Page Changers -- //
+ if("logout")
+ last_menu = current_menu
+ current_menu = "login"
+ if(sudo_holder)
+ datacore.interface_access_list += "[last_login] at [worldtime2text()], Sudo Logout."
+ last_login = sudo_holder
+ sudo_holder = null
+ datacore.interface_access_list += "[last_login] logged out at [worldtime2text()]."
+
+ if("home")
+ last_menu = current_menu
+ current_menu = "main"
+ if("page_1to1")
+ last_menu = current_menu
+ current_menu = "talking"
+ if("page_announcements")
+ last_menu = current_menu
+ current_menu = "announcements"
+ if("page_bioscans")
+ last_menu = current_menu
+ current_menu = "bioscans"
+ if("page_bombardments")
+ last_menu = current_menu
+ current_menu = "bombardments"
+ if("page_apollo")
+ last_menu = current_menu
+ current_menu = "apollo"
+ if("page_access")
+ last_menu = current_menu
+ current_menu = "access_log"
+ if("page_security")
+ last_menu = current_menu
+ current_menu = "security"
+ if("page_flight")
+ last_menu = current_menu
+ current_menu = "flight_log"
+ if("page_requisitions")
+ last_menu = current_menu
+ current_menu = "requisitions"
+ if("page_emergency")
+ last_menu = current_menu
+ current_menu = "emergency"
+ if("page_deleted")
+ last_menu = current_menu
+ current_menu = "delete_log"
+ if("page_deleted_1to1")
+ last_menu = current_menu
+ current_menu = "deleted_talks"
+
+ // -- Delete Button -- //
+ if("delete_record")
+ var/datum/ares_record/record = locate(params["record"])
+ if(record.record_name == ARES_RECORD_DELETED)
+ return FALSE
+ var/datum/ares_record/deletion/new_delete = new
+ var/new_details = "Error"
+ var/new_title = "Error"
+ switch(record.record_name)
+ if(ARES_RECORD_ANNOUNCE)
+ new_title = "[record.title] at [record.time]"
+ new_details = record.details
+ datacore.records_announcement -= record
+ if(ARES_RECORD_SECURITY, ARES_RECORD_ANTIAIR)
+ new_title = "[record.title] at [record.time]"
+ new_details = record.details
+ datacore.records_security -= record
+ if(ARES_RECORD_BIOSCAN)
+ new_title = "[record.title] at [record.time]"
+ new_details = record.details
+ datacore.records_bioscan -= record
+ if(ARES_RECORD_BOMB)
+ new_title = "[record.title] at [record.time]"
+ new_details = "[record.details] Launched by [record.user]."
+ datacore.records_bombardment -= record
+
+ new_delete.details = new_details
+ new_delete.user = last_login
+ new_delete.title = new_title
+
+ datacore.records_deletion += new_delete
+
+ // -- 1:1 Conversation -- //
+ if("new_conversation")
+ var/datum/ares_record/talk_log/convo = new(last_login)
+ convo.conversation += "[MAIN_AI_SYSTEM] at [worldtime2text()], 'New 1:1 link initiated. Greetings, [last_login].'"
+ datacore.records_talking += convo
+
+ if("clear_conversation")
+ var/datum/ares_record/talk_log/conversation = locate(params["active_convo"])
+ if(!istype(conversation))
+ return FALSE
+ var/datum/ares_record/deleted_talk/deleted = new
+ deleted.title = conversation.title
+ deleted.conversation = conversation.conversation
+ deleted.user = conversation.user
+ datacore.records_deletion += deleted
+ datacore.records_talking -= conversation
+
+ if("message_ares")
+ var/message = tgui_input_text(usr, "What do you wish to say to ARES?", "ARES Message", encode = FALSE)
+ if(message)
+ message_ares(message, usr, params["active_convo"])
+
+ if("read_record")
+ var/datum/ares_record/deleted_talk/conversation = locate(params["record"])
+ deleted_1to1 = conversation.conversation
+ last_menu = current_menu
+ current_menu = "read_deleted"
+
+ // -- Emergency Buttons -- //
+ if("general_quarters")
+ if(!COOLDOWN_FINISHED(datacore, ares_quarters_cooldown))
+ to_chat(usr, SPAN_WARNING("It has not been long enough since the last General Quarters call!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(security_level < SEC_LEVEL_RED)
+ set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)
+ shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
+ log_game("[key_name(usr)] has called for general quarters via ARES.")
+ message_admins("[key_name_admin(usr)] has called for general quarters via ARES.")
+ datacore.log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.")
+ COOLDOWN_START(datacore, ares_quarters_cooldown, 10 MINUTES)
+ . = TRUE
+
+ if("evacuation_start")
+ if(security_level < SEC_LEVEL_RED)
+ to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ if(EvacuationAuthority.flags_scuttle & FLAGS_EVACUATION_DENY)
+ to_chat(usr, SPAN_WARNING("The USCM has placed a lock on deploying the evacuation pods."))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ if(!EvacuationAuthority.initiate_evacuation())
+ to_chat(usr, SPAN_WARNING("You are unable to initiate an evacuation procedure right now!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ log_game("[key_name(usr)] has called for an emergency evacuation via ARES.")
+ message_admins("[key_name_admin(usr)] has called for an emergency evacuation via ARES.")
+ datacore.log_ares_security("Initiate Evacuation", "[last_login] has called for an emergency evacuation via ARES.")
+ . = TRUE
+
+ if("distress")
+ if(!SSticker.mode)
+ return FALSE //Not a game mode?
+ if(world.time < DISTRESS_TIME_LOCK)
+ to_chat(usr, SPAN_WARNING("You have been here for less than six minutes... what could you possibly have done!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(!COOLDOWN_FINISHED(datacore, ares_distress_cooldown))
+ to_chat(usr, SPAN_WARNING("The distress launcher is cooling down!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(security_level == SEC_LEVEL_DELTA)
+ to_chat(usr, SPAN_WARNING("The ship is already undergoing self destruct procedures!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ else if(security_level < SEC_LEVEL_RED)
+ to_chat(usr, SPAN_WARNING("The ship must be under red alert to launch a distress beacon!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ for(var/client/admin in GLOB.admins)
+ if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
+ playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
+ SSticker.mode.request_ert(usr, TRUE)
+ to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM High Command."))
+ COOLDOWN_START(datacore, ares_distress_cooldown, COOLDOWN_COMM_REQUEST)
+ return TRUE
+
+ if("nuclearbomb")
+ if(!SSticker.mode)
+ return FALSE //Not a game mode?
+ if(world.time < NUCLEAR_TIME_LOCK)
+ to_chat(usr, SPAN_WARNING("It is too soon to request Nuclear Ordnance!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(!COOLDOWN_FINISHED(datacore, ares_nuclear_cooldown))
+ to_chat(usr, SPAN_WARNING("The ordnance request frequency is garbled, wait for reset!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
+ to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ var/reason = tgui_input_text(usr, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
+ if(!reason)
+ return FALSE
+ for(var/client/admin in GLOB.admins)
+ if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
+ playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
+ message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: [reason] [CC_MARK(usr)] (APPROVE) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
+ to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
+ if(ares_can_log())
+ datacore.log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
+ if(ares_can_interface())
+ ai_silent_announcement("[last_login] has sent a request for nuclear ordnance to USCM High Command.", ".V")
+ ai_silent_announcement("Reason given: [reason].", ".V")
+ COOLDOWN_START(datacore, ares_nuclear_cooldown, COOLDOWN_COMM_DESTRUCT)
+ return TRUE
diff --git a/code/game/machinery/ARES/ARES_interface_apollo.dm b/code/game/machinery/ARES/ARES_interface_apollo.dm
new file mode 100644
index 000000000000..005e60019d4c
--- /dev/null
+++ b/code/game/machinery/ARES/ARES_interface_apollo.dm
@@ -0,0 +1,405 @@
+// #################### Working Joe Ticket Console #####################
+/obj/structure/machinery/computer/working_joe
+ name = "APOLLO Maintenance Controller"
+ desc = "A console built to facilitate Working Joes and their operation, allowing for simple allocation of resources."
+ icon = 'icons/obj/structures/machinery/ares.dmi'
+ icon_state = "console"
+ exproof = TRUE
+
+ /// The ID used to link all devices.
+ var/datum/ares_link/link
+ /// The datacore storing all the information.
+ var/datum/ares_datacore/datacore
+
+ var/current_menu = "login"
+ var/last_menu = ""
+
+ var/authentication = ARES_ACCESS_BASIC
+ /// The last person to login.
+ var/last_login
+
+
+/obj/structure/machinery/computer/working_joe/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
+ if(link && !override)
+ return FALSE
+ if(new_link)
+ new_link.ticket_computers += src
+ link = new_link
+ new_link.linked_systems += src
+ if(!datacore)
+ datacore = GLOB.ares_datacore
+ return TRUE
+
+/obj/structure/machinery/computer/working_joe/Initialize(mapload, ...)
+ link_systems(override = FALSE)
+ . = ..()
+
+/obj/structure/machinery/computer/working_joe/proc/delink()
+ if(link)
+ link.ticket_computers -= src
+ link.linked_systems -= src
+ link = null
+ datacore = null
+
+/obj/structure/machinery/computer/working_joe/Destroy()
+ delink()
+ return ..()
+
+// ------ Maintenance Controller UI ------ //
+/obj/structure/machinery/computer/working_joe/attack_hand(mob/user as mob)
+ if(..() || !allowed(usr) || inoperable())
+ return FALSE
+
+ tgui_interact(user)
+ return TRUE
+
+/obj/structure/machinery/computer/working_joe/tgui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "WorkingJoe", name)
+ ui.open()
+
+/obj/structure/machinery/computer/working_joe/ui_data(mob/user)
+ var/list/data = list()
+
+ data["current_menu"] = current_menu
+ data["last_page"] = last_menu
+
+ data["logged_in"] = last_login
+
+ data["access_text"] = "access level [authentication], [ares_auth_to_text(authentication)]."
+ data["access_level"] = authentication
+
+ data["alert_level"] = security_level
+ data["worldtime"] = world.time
+
+ data["access_log"] = list()
+ data["access_log"] += datacore.apollo_login_list
+
+ data["apollo_log"] = list()
+ data["apollo_log"] += datacore.apollo_log
+
+ var/list/logged_maintenance = list()
+ for(var/datum/ares_ticket/maintenance/maint_ticket as anything in link.tickets_maintenance)
+ if(!istype(maint_ticket))
+ continue
+ var/lock_status = TICKET_OPEN
+ switch(maint_ticket.ticket_status)
+ if(TICKET_REJECTED, TICKET_CANCELLED, TICKET_COMPLETED)
+ lock_status = TICKET_CLOSED
+
+ var/list/current_maint = list()
+ current_maint["id"] = maint_ticket.ticket_id
+ current_maint["time"] = maint_ticket.ticket_time
+ current_maint["priority_status"] = maint_ticket.ticket_priority
+ current_maint["category"] = maint_ticket.ticket_name
+ current_maint["details"] = maint_ticket.ticket_details
+ current_maint["status"] = maint_ticket.ticket_status
+ current_maint["submitter"] = maint_ticket.ticket_submitter
+ current_maint["assignee"] = maint_ticket.ticket_assignee
+ current_maint["lock_status"] = lock_status
+ current_maint["ref"] = "\ref[maint_ticket]"
+ logged_maintenance += list(current_maint)
+ data["maintenance_tickets"] = logged_maintenance
+
+ var/list/logged_access = list()
+ var/list/requesting_access = list()
+ for(var/datum/ares_ticket/access/access_ticket as anything in link.tickets_access)
+ var/lock_status = TICKET_OPEN
+ switch(access_ticket.ticket_status)
+ if(TICKET_REJECTED, TICKET_CANCELLED, TICKET_REVOKED)
+ lock_status = TICKET_CLOSED
+
+ var/list/current_ticket = list()
+ current_ticket["id"] = access_ticket.ticket_id
+ current_ticket["time"] = access_ticket.ticket_time
+ current_ticket["priority_status"] = access_ticket.ticket_priority
+ current_ticket["title"] = access_ticket.ticket_name
+ current_ticket["details"] = access_ticket.ticket_details
+ current_ticket["status"] = access_ticket.ticket_status
+ current_ticket["submitter"] = access_ticket.ticket_submitter
+ current_ticket["assignee"] = access_ticket.ticket_assignee
+ current_ticket["lock_status"] = lock_status
+ current_ticket["ref"] = "\ref[access_ticket]"
+ logged_access += list(current_ticket)
+
+ if(lock_status == TICKET_OPEN)
+ requesting_access += access_ticket.ticket_name
+ data["access_tickets"] = logged_access
+
+ return data
+
+/obj/structure/machinery/computer/working_joe/ui_status(mob/user, datum/ui_state/state)
+ . = ..()
+ if(!allowed(user))
+ return UI_UPDATE
+ if(inoperable())
+ return UI_DISABLED
+
+/obj/structure/machinery/computer/working_joe/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
+ . = ..()
+ if(.)
+ return
+
+ var/playsound = TRUE
+ var/mob/living/carbon/human/operator = usr
+
+ switch (action)
+ if("go_back")
+ if(!last_menu)
+ return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
+ var/temp_holder = current_menu
+ current_menu = last_menu
+ last_menu = temp_holder
+
+ if("login")
+
+ var/obj/item/card/id/idcard = operator.get_active_hand()
+ if(istype(idcard))
+ authentication = get_ares_access(idcard)
+ last_login = idcard.registered_name
+ else if(operator.wear_id)
+ idcard = operator.wear_id
+ if(istype(idcard))
+ authentication = get_ares_access(idcard)
+ last_login = idcard.registered_name
+ else
+ to_chat(operator, SPAN_WARNING("You require an ID card to access this terminal!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(authentication)
+ datacore.apollo_login_list += "[last_login] at [worldtime2text()], Access Level [authentication] - [ares_auth_to_text(authentication)]."
+ current_menu = "main"
+
+ if("logout")
+ last_menu = current_menu
+ current_menu = "login"
+ datacore.apollo_login_list += "[last_login] logged out at [worldtime2text()]."
+
+ if("home")
+ last_menu = current_menu
+ current_menu = "main"
+ if("page_logins")
+ last_menu = current_menu
+ current_menu = "login_records"
+ if("page_apollo")
+ last_menu = current_menu
+ current_menu = "apollo"
+ if("page_request")
+ last_menu = current_menu
+ current_menu = "access_requests"
+ if("page_report")
+ last_menu = current_menu
+ current_menu = "maint_reports"
+ if("page_tickets")
+ last_menu = current_menu
+ current_menu = "access_tickets"
+ if("page_maintenance")
+ last_menu = current_menu
+ current_menu = "maint_claim"
+
+ if("new_report")
+ var/priority_report = FALSE
+ var/maint_type = tgui_input_list(operator, "What is the type of maintenance item you wish to report?", "Report Category", GLOB.maintenance_categories, 30 SECONDS)
+ switch(maint_type)
+ if("Major Structural Damage", "Fire", "Communications Failure", "Power Generation Failure")
+ priority_report = TRUE
+
+ if(!maint_type)
+ return FALSE
+ var/details = tgui_input_text(operator, "What are the details for this report?", "Ticket Details", encode = FALSE)
+ if(!details)
+ return FALSE
+
+ if((authentication >= APOLLO_ACCESS_REPORTER) && !priority_report)
+ var/is_priority = tgui_alert(operator, "Is this a priority report?", "Priority designation", list("Yes", "No"))
+ if(is_priority == "Yes")
+ priority_report = TRUE
+
+ var/confirm = alert(operator, "Please confirm the submission of your maintenance report. \n\n Priority: [priority_report ? "Yes" : "No"] \n Category: '[maint_type]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
+ if(confirm == "Yes")
+ if(link)
+ var/datum/ares_ticket/maintenance/maint_ticket = new(last_login, maint_type, details, priority_report)
+ link.tickets_maintenance += maint_ticket
+ if(priority_report)
+ ares_apollo_talk("Priority Maintenance Report: [maint_type] - ID [maint_ticket.ticket_id]. Seek and resolve.")
+ log_game("ARES: Maintenance Ticket '\ref[maint_ticket]' created by [key_name(operator)] as [last_login] with Category '[maint_type]' and Details of '[details]'.")
+ return TRUE
+ return FALSE
+
+ if("claim_ticket")
+ var/datum/ares_ticket/ticket = locate(params["ticket"])
+ if(!istype(ticket))
+ return FALSE
+ var/claim = TRUE
+ var/assigned = ticket.ticket_assignee
+ if(assigned)
+ if(assigned == last_login)
+ var/prompt = tgui_alert(usr, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
+ if(prompt != "Yes")
+ return FALSE
+ /// set ticket back to pending
+ ticket.ticket_assignee = null
+ ticket.ticket_status = TICKET_PENDING
+ return claim
+ var/choice = tgui_alert(usr, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
+ if(choice != "Yes")
+ claim = FALSE
+ if(claim)
+ ticket.ticket_assignee = last_login
+ ticket.ticket_status = TICKET_ASSIGNED
+ return claim
+
+ if("cancel_ticket")
+ var/datum/ares_ticket/ticket = locate(params["ticket"])
+ if(!istype(ticket))
+ return FALSE
+ if(ticket.ticket_submitter != last_login)
+ to_chat(usr, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
+ return FALSE
+ to_chat(usr, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
+ ticket.ticket_status = TICKET_CANCELLED
+ if(ticket.ticket_priority)
+ ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been cancelled.")
+ return TRUE
+
+ if("mark_ticket")
+ var/datum/ares_ticket/ticket = locate(params["ticket"])
+ if(!istype(ticket))
+ return FALSE
+ if(ticket.ticket_assignee != last_login && ticket.ticket_assignee) //must be claimed by you or unclaimed.)
+ to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
+ return FALSE
+ var/choice = tgui_alert(usr, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
+ switch(choice)
+ if(TICKET_COMPLETED)
+ ticket.ticket_status = TICKET_COMPLETED
+ if(TICKET_REJECTED)
+ ticket.ticket_status = TICKET_REJECTED
+ else
+ return FALSE
+ if(ticket.ticket_priority)
+ ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been [choice] by [last_login].")
+ to_chat(usr, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
+ return TRUE
+
+ if("new_access")
+ var/obj/item/card/id/idcard = operator.get_active_hand()
+ var/has_id = FALSE
+ if(istype(idcard))
+ has_id = TRUE
+ else if(operator.wear_id)
+ idcard = operator.wear_id
+ if(istype(idcard))
+ has_id = TRUE
+ if(!has_id)
+ to_chat(operator, SPAN_WARNING("You require an ID card to request an access ticket!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+ if(idcard.registered_name != last_login)
+ to_chat(operator, SPAN_WARNING("This ID card does not match the active login!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ var/ticket_holder = last_login
+ if(!ticket_holder)
+ return FALSE
+ var/details = tgui_input_text(operator, "What is the purpose of this access ticket?", "Ticket Details", encode = FALSE)
+ if(!details)
+ return FALSE
+
+ var/confirm = alert(operator, "Please confirm the submission of your access ticket request. \n\nHolder: '[ticket_holder]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
+ if(confirm != "Yes" || !link)
+ return FALSE
+ var/datum/ares_ticket/access/access_ticket = new(last_login, ticket_holder, details, FALSE, idcard.registered_gid)
+ link.waiting_ids += idcard
+ link.tickets_access += access_ticket
+ log_game("ARES: Access Ticket '\ref[access_ticket]' created by [key_name(operator)] as [last_login] with Holder '[ticket_holder]' and Details of '[details]'.")
+ message_admins(SPAN_STAFF_IC("[key_name_admin(operator)] created a new ARES Access Ticket."), 1)
+ return TRUE
+
+ if("return_access")
+ playsound = FALSE
+ var/datum/ares_ticket/access/access_ticket
+ for(var/datum/ares_ticket/access/possible_ticket in link.tickets_access)
+ if(possible_ticket.ticket_status != TICKET_GRANTED)
+ continue
+ if(possible_ticket.ticket_name != last_login)
+ continue
+ access_ticket = possible_ticket
+ break
+
+ for(var/obj/item/card/id/identification in link.active_ids)
+ if(!istype(identification))
+ continue
+ if(identification.registered_gid != access_ticket.user_id_num)
+ continue
+
+ access_ticket.ticket_status = TICKET_RETURNED
+ identification.access -= ACCESS_MARINE_AI_TEMP
+ identification.modification_log += "Temporary AI Access self-returned by [key_name(operator)]."
+
+ to_chat(operator, SPAN_NOTICE("Temporary Access Ticket surrendered."))
+ playsound(src, 'sound/machines/chime.ogg', 15, 1)
+ ares_apollo_talk("[last_login] surrendered their access ticket.")
+
+ authentication = get_ares_access(identification)
+ if(authentication)
+ datacore.apollo_login_list += "[last_login] at [worldtime2text()], Surrendered Temporary Access Ticket."
+ return TRUE
+
+ to_chat(operator, SPAN_WARNING("This ID card does not have an access ticket!"))
+ playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
+ return FALSE
+
+ if("auth_access")
+ playsound = FALSE
+ var/datum/ares_ticket/access/access_ticket = locate(params["ticket"])
+ if(!access_ticket)
+ return FALSE
+ for(var/obj/item/card/id/identification in link.waiting_ids)
+ if(!istype(identification))
+ continue
+ if(identification.registered_gid != access_ticket.user_id_num)
+ continue
+ identification.handle_ares_access(last_login, operator)
+ access_ticket.ticket_status = TICKET_GRANTED
+ playsound(src, 'sound/machines/chime.ogg', 15, 1)
+ return TRUE
+ for(var/obj/item/card/id/identification in link.active_ids)
+ if(!istype(identification))
+ continue
+ if(identification.registered_gid != access_ticket.user_id_num)
+ continue
+ identification.handle_ares_access(last_login, operator)
+ access_ticket.ticket_status = TICKET_REVOKED
+ playsound(src, 'sound/machines/chime.ogg', 15, 1)
+ return TRUE
+ return FALSE
+
+ if(playsound)
+ playsound(src, "keyboard_alt", 15, 1)
+
+/obj/item/card/id/proc/handle_ares_access(logged_in, mob/user)
+ var/announce_text = "[logged_in] revoked core access from [registered_name]'s ID card."
+ var/operator = key_name(user)
+ var/datum/ares_link/link = GLOB.ares_link
+ if(logged_in == MAIN_AI_SYSTEM)
+ if(!user)
+ operator = "[MAIN_AI_SYSTEM] (Sensor Trip)"
+ else
+ operator = "[user.ckey]/([MAIN_AI_SYSTEM])"
+ if(ACCESS_MARINE_AI_TEMP in access)
+ access -= ACCESS_MARINE_AI_TEMP
+ link.active_ids -= src
+ modification_log += "Temporary AI access revoked by [operator]"
+ to_chat(user, SPAN_NOTICE("Access revoked from [registered_name]."))
+ else
+ access += ACCESS_MARINE_AI_TEMP
+ modification_log += "Temporary AI access granted by [operator]"
+ announce_text = "[logged_in] granted core access to [registered_name]'s ID card."
+ to_chat(user, SPAN_NOTICE("Access granted to [registered_name]."))
+ link.waiting_ids -= src
+ link.active_ids += src
+ ares_apollo_talk(announce_text)
+ return TRUE
diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm
index e03f218f0f34..21436d7b23ab 100644
--- a/code/game/machinery/ARES/ARES_procs.dm
+++ b/code/game/machinery/ARES/ARES_procs.dm
@@ -1,4 +1,5 @@
GLOBAL_DATUM_INIT(ares_link, /datum/ares_link, new)
+GLOBAL_DATUM_INIT(ares_datacore, /datum/ares_datacore, new)
GLOBAL_LIST_INIT(maintenance_categories, list(
"Broken Light",
"Shattered Glass",
@@ -15,26 +16,56 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
))
/datum/ares_link
- var/link_id = MAIN_SHIP_DEFAULT_NAME
/// All motion triggers for the link
var/list/linked_alerts = list()
/// All machinery for the link
var/list/linked_systems = list()
- var/obj/structure/machinery/ares/processor/interface/p_interface
- var/obj/structure/machinery/ares/processor/apollo/p_apollo
- var/obj/structure/machinery/ares/processor/bioscan/p_bioscan
+ var/obj/structure/machinery/ares/cpu/central_processor
+ var/obj/structure/machinery/ares/processor/interface/processor_interface
+ var/obj/structure/machinery/ares/processor/apollo/processor_apollo
+ var/obj/structure/machinery/ares/processor/bioscan/processor_bioscan
var/obj/structure/machinery/computer/ares_console/interface
var/list/obj/structure/machinery/computer/working_joe/ticket_computers = list()
- /// The chat log of the apollo link. Timestamped.
- var/list/apollo_log = list()
-
/// Working Joe stuff
var/list/tickets_maintenance = list()
var/list/tickets_access = list()
var/list/waiting_ids = list()
var/list/active_ids = list()
+/datum/ares_datacore
+ /// A record of who logged in and when.
+ var/list/interface_access_list = list()
+ /// Access list for Apollo Maintenance Console
+ var/list/apollo_login_list = list()
+
+ /// The chat log of the apollo link. Timestamped.
+ var/list/apollo_log = list()
+
+ /// Holds all (/datum/ares_record/announcement)s
+ var/list/records_announcement = list()
+ /// Holds all (/datum/ares_record/bioscan)s
+ var/list/records_bioscan = list()
+ /// Holds all (/datum/ares_record/bombardment)s
+ var/list/records_bombardment = list()
+ /// Holds all (/datum/ares_record/deletion)s
+ var/list/records_deletion = list()
+ /// Holds all (/datum/ares_record/talk_log)s
+ var/list/records_talking = list()
+ /// Holds all (/datum/ares_record/requisition_log)s
+ var/list/records_asrs = list()
+ /// Holds all (/datum/ares_record/security)s (including AA)
+ var/list/records_security = list()
+ /// Holds all (/datum/ares_record/flight)s
+ var/list/records_flight = list()
+ /// Is nuke request usable or not?
+ var/nuke_available = TRUE
+
+
+ COOLDOWN_DECLARE(ares_distress_cooldown)
+ COOLDOWN_DECLARE(ares_nuclear_cooldown)
+ COOLDOWN_DECLARE(ares_quarters_cooldown)
+
/datum/ares_link/Destroy()
for(var/obj/structure/machinery/ares/link in linked_systems)
link.delink()
@@ -50,32 +81,35 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
if(!speaker)
speaker = "Unknown"
var/datum/ares_link/link = GLOB.ares_link
- if(!link.p_apollo || link.p_apollo.inoperable())
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(!istype(link) || !istype(datacore))
return FALSE
- if(!link.p_interface || link.p_interface.inoperable())
+ if(!link.processor_apollo || link.processor_apollo.inoperable())
return FALSE
- link.apollo_log.Add("[worldtime2text()]: [speaker], '[message]'")
+ if(!ares_can_log())
+ return FALSE
+ datacore.apollo_log.Add("[worldtime2text()]: [speaker], '[message]'")
-/datum/ares_link/proc/log_ares_bioscan(title, input)
- interface.records_bioscan.Add(new /datum/ares_record/bioscan(title, input))
+/datum/ares_datacore/proc/log_ares_bioscan(title, input)
+ records_bioscan.Add(new /datum/ares_record/bioscan(title, input))
-/datum/ares_link/proc/log_ares_bombardment(user_name, ob_name, coordinates)
- interface.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, "Bombardment fired at [coordinates].", user_name))
+/datum/ares_datacore/proc/log_ares_bombardment(user_name, ob_name, coordinates)
+ records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, "Bombardment fired at [coordinates].", user_name))
-/datum/ares_link/proc/log_ares_announcement(title, message)
- interface.records_announcement.Add(new /datum/ares_record/announcement(title, message))
+/datum/ares_datacore/proc/log_ares_announcement(title, message)
+ records_announcement.Add(new /datum/ares_record/announcement(title, message))
-/datum/ares_link/proc/log_ares_requisition(source, details, user_name)
- interface.records_asrs.Add(new /datum/ares_record/requisition_log(source, details, user_name))
+/datum/ares_datacore/proc/log_ares_requisition(source, details, user_name)
+ records_asrs.Add(new /datum/ares_record/requisition_log(source, details, user_name))
-/datum/ares_link/proc/log_ares_security(title, details)
- interface.records_security.Add(new /datum/ares_record/security(title, details))
+/datum/ares_datacore/proc/log_ares_security(title, details)
+ records_security.Add(new /datum/ares_record/security(title, details))
-/datum/ares_link/proc/log_ares_antiair(details)
- interface.records_security.Add(new /datum/ares_record/security/antiair(details))
+/datum/ares_datacore/proc/log_ares_antiair(details)
+ records_security.Add(new /datum/ares_record/security/antiair(details))
-/datum/ares_link/proc/log_ares_flight(user_name, details)
- interface.records_flight.Add(new /datum/ares_record/flight(details, user_name))
+/datum/ares_datacore/proc/log_ares_flight(user_name, details)
+ records_flight.Add(new /datum/ares_record/flight(details, user_name))
// ------ End ARES Logging Procs ------ //
/proc/ares_apollo_talk(broadcast_message)
@@ -89,7 +123,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
playsound_client(listener.client, sound('sound/misc/interference.ogg'), listener, vol = 45)
/proc/ares_can_interface()
- var/obj/structure/machinery/ares/processor/interface/processor = GLOB.ares_link.p_interface
+ var/obj/structure/machinery/ares/processor/interface/processor = GLOB.ares_link.processor_interface
if(!istype(GLOB.ares_link))
return FALSE
if(processor && !processor.inoperable())
@@ -97,12 +131,12 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
return FALSE //interface processor not found or is broken
/proc/ares_can_log()
- var/obj/structure/machinery/computer/ares_console/interface = GLOB.ares_link.interface
- if(!istype(GLOB.ares_link))
+ if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore))
return FALSE
- if(interface && !interface.inoperable())
+ var/obj/structure/machinery/ares/cpu/central_processor = GLOB.ares_link.central_processor
+ if(central_processor && !central_processor.inoperable())
return TRUE
- return FALSE //ares interface not found or is broken
+ return FALSE //CPU not found or is broken
// ------ ARES Interface Procs ------ //
/obj/structure/machinery/computer/proc/get_ares_access(obj/item/card/id/card)
@@ -172,440 +206,6 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
conversation.conversation += "[MAIN_AI_SYSTEM] at [worldtime2text()], '[text]'"
// ------ End ARES Interface Procs ------ //
-// ------ ARES Interface UI ------ //
-
-/obj/structure/machinery/computer/ares_console/attack_hand(mob/user as mob)
- if(..() || !allowed(usr) || inoperable())
- return FALSE
-
- tgui_interact(user)
- return TRUE
-
-/obj/structure/machinery/computer/ares_console/tgui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
- ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "AresInterface", name)
- ui.open()
-
-/obj/structure/machinery/computer/ares_console/ui_data(mob/user)
- var/list/data = list()
-
- data["current_menu"] = current_menu
- data["last_page"] = last_menu
-
- data["logged_in"] = last_login
- data["sudo"] = sudo_holder ? TRUE : FALSE
-
- data["access_text"] = "[sudo_holder ? "(SUDO)," : ""] access level [authentication], [ares_auth_to_text(authentication)]."
- data["access_level"] = authentication
-
- data["alert_level"] = security_level
- data["evac_status"] = EvacuationAuthority.evac_status
- data["worldtime"] = world.time
-
- data["access_log"] = list()
- data["access_log"] += access_list
- data["apollo_log"] = list()
- data["apollo_log"] += link.apollo_log
-
- data["deleted_conversation"] = list()
- data["deleted_conversation"] += deleted_1to1
-
- data["distresstime"] = ares_distress_cooldown
- data["distresstimelock"] = DISTRESS_TIME_LOCK
- data["quarterstime"] = ares_quarters_cooldown
- data["mission_failed"] = SSticker.mode.is_in_endgame
- data["nuketimelock"] = NUCLEAR_TIME_LOCK
- data["nuke_available"] = nuke_available
-
- var/list/logged_announcements = list()
- for(var/datum/ares_record/announcement/broadcast as anything in records_announcement)
- var/list/current_broadcast = list()
- current_broadcast["time"] = broadcast.time
- current_broadcast["title"] = broadcast.title
- current_broadcast["details"] = broadcast.details
- current_broadcast["ref"] = "\ref[broadcast]"
- logged_announcements += list(current_broadcast)
- data["records_announcement"] = logged_announcements
-
- var/list/logged_alerts = list()
- for(var/datum/ares_record/security/security_alert as anything in records_security)
- var/list/current_alert = list()
- current_alert["time"] = security_alert.time
- current_alert["title"] = security_alert.title
- current_alert["details"] = security_alert.details
- current_alert["ref"] = "\ref[security_alert]"
- logged_alerts += list(current_alert)
- data["records_security"] = logged_alerts
-
- var/list/logged_flights = list()
- for(var/datum/ares_record/flight/flight_log as anything in records_flight)
- var/list/current_flight = list()
- current_flight["time"] = flight_log.time
- current_flight["title"] = flight_log.title
- current_flight["details"] = flight_log.details
- current_flight["user"] = flight_log.user
- current_flight["ref"] = "\ref[flight_log]"
- logged_flights += list(current_flight)
- data["records_flight"] = logged_flights
-
- var/list/logged_bioscans = list()
- for(var/datum/ares_record/bioscan/scan as anything in records_bioscan)
- var/list/current_scan = list()
- current_scan["time"] = scan.time
- current_scan["title"] = scan.title
- current_scan["details"] = scan.details
- current_scan["ref"] = "\ref[scan]"
- logged_bioscans += list(current_scan)
- data["records_bioscan"] = logged_bioscans
-
- var/list/logged_bombs = list()
- for(var/datum/ares_record/bombardment/bomb as anything in records_bombardment)
- var/list/current_bomb = list()
- current_bomb["time"] = bomb.time
- current_bomb["title"] = bomb.title
- current_bomb["details"] = bomb.details
- current_bomb["user"] = bomb.user
- current_bomb["ref"] = "\ref[bomb]"
- logged_bombs += list(current_bomb)
- data["records_bombardment"] = logged_bombs
-
- var/list/logged_deletes = list()
- for(var/datum/ares_record/deletion/deleted as anything in records_deletion)
- if(!istype(deleted))
- continue
- var/list/current_delete = list()
- current_delete["time"] = deleted.time
- current_delete["title"] = deleted.title
- current_delete["details"] = deleted.details
- current_delete["user"] = deleted.user
- current_delete["ref"] = "\ref[deleted]"
- logged_deletes += list(current_delete)
- data["records_deletion"] = logged_deletes
-
- var/list/logged_discussions = list()
- for(var/datum/ares_record/deleted_talk/deleted_convo as anything in records_deletion)
- if(!istype(deleted_convo))
- continue
- var/list/deleted_disc = list()
- deleted_disc["time"] = deleted_convo.time
- deleted_disc["title"] = deleted_convo.title
- deleted_disc["ref"] = "\ref[deleted_convo]"
- logged_discussions += list(deleted_disc)
- data["deleted_discussions"] = logged_discussions
-
- var/list/logged_orders = list()
- for(var/datum/ares_record/requisition_log/req_order as anything in records_asrs)
- if(!istype(req_order))
- continue
- var/list/current_order = list()
- current_order["time"] = req_order.time
- current_order["details"] = req_order.details
- current_order["title"] = req_order.title
- current_order["user"] = req_order.user
- current_order["ref"] = "\ref[req_order]"
- logged_orders += list(current_order)
- data["records_requisition"] = logged_orders
-
- var/list/logged_convos = list()
- var/list/active_convo = list()
- var/active_ref
- for(var/datum/ares_record/talk_log/log as anything in records_talking)
- if(!istype(log))
- continue
- if(log.user == last_login)
- active_convo = log.conversation
- active_ref = "\ref[log]"
-
- var/list/current_convo = list()
- current_convo["user"] = log.user
- current_convo["ref"] = "\ref[log]"
- current_convo["conversation"] = log.conversation
- logged_convos += list(current_convo)
-
- data["active_convo"] = active_convo
- data["active_ref"] = active_ref
- data["conversations"] = logged_convos
-
- return data
-
-/obj/structure/machinery/computer/ares_console/ui_static_data(mob/user)
- var/list/data = list()
-
- data["link_id"] = link_id
-
- return data
-
-/obj/structure/machinery/computer/ares_console/ui_status(mob/user, datum/ui_state/state)
- . = ..()
- if(!allowed(user))
- return UI_UPDATE
- if(inoperable())
- return UI_DISABLED
-
-/obj/structure/machinery/computer/ares_console/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
- . = ..()
- if(.)
- return
-
- playsound(src, "keyboard_alt", 15, 1)
-
- switch (action)
- if("go_back")
- if(!last_menu)
- return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
- var/temp_holder = current_menu
- current_menu = last_menu
- last_menu = temp_holder
-
- if("login")
- var/mob/living/carbon/human/operator = usr
- var/obj/item/card/id/idcard = operator.get_active_hand()
- if(istype(idcard))
- authentication = get_ares_access(idcard)
- last_login = idcard.registered_name
- else if(operator.wear_id)
- idcard = operator.wear_id
- if(istype(idcard))
- authentication = get_ares_access(idcard)
- last_login = idcard.registered_name
- else
- to_chat(usr, SPAN_WARNING("You require an ID card to access this terminal!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(authentication)
- access_list += "[last_login] at [worldtime2text()], Access Level [authentication] - [ares_auth_to_text(authentication)]."
- current_menu = "main"
-
- if("sudo")
- var/new_user = tgui_input_text(usr, "Enter Sudo Username", "Sudo User", encode = FALSE)
- if(new_user)
- if(new_user == sudo_holder)
- last_login = sudo_holder
- sudo_holder = null
- return FALSE
- if(new_user == last_login)
- to_chat(usr, SPAN_WARNING("Already remote logged in as this user."))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- sudo_holder = last_login
- last_login = new_user
- access_list += "[last_login] at [worldtime2text()], Sudo Access."
- return TRUE
- if("sudo_logout")
- access_list += "[last_login] at [worldtime2text()], Sudo Logout."
- last_login = sudo_holder
- sudo_holder = null
- return
- // -- Page Changers -- //
- if("logout")
- last_menu = current_menu
- current_menu = "login"
- if(sudo_holder)
- access_list += "[last_login] at [worldtime2text()], Sudo Logout."
- last_login = sudo_holder
- sudo_holder = null
- access_list += "[last_login] logged out at [worldtime2text()]."
-
- if("home")
- last_menu = current_menu
- current_menu = "main"
- if("page_1to1")
- last_menu = current_menu
- current_menu = "talking"
- if("page_announcements")
- last_menu = current_menu
- current_menu = "announcements"
- if("page_bioscans")
- last_menu = current_menu
- current_menu = "bioscans"
- if("page_bombardments")
- last_menu = current_menu
- current_menu = "bombardments"
- if("page_apollo")
- last_menu = current_menu
- current_menu = "apollo"
- if("page_access")
- last_menu = current_menu
- current_menu = "access_log"
- if("page_security")
- last_menu = current_menu
- current_menu = "security"
- if("page_flight")
- last_menu = current_menu
- current_menu = "flight_log"
- if("page_requisitions")
- last_menu = current_menu
- current_menu = "requisitions"
- if("page_emergency")
- last_menu = current_menu
- current_menu = "emergency"
- if("page_deleted")
- last_menu = current_menu
- current_menu = "delete_log"
- if("page_deleted_1to1")
- last_menu = current_menu
- current_menu = "deleted_talks"
-
- // -- Delete Button -- //
- if("delete_record")
- var/datum/ares_record/record = locate(params["record"])
- if(record.record_name == ARES_RECORD_DELETED)
- return FALSE
- var/datum/ares_record/deletion/new_delete = new
- var/new_details = "Error"
- var/new_title = "Error"
- switch(record.record_name)
- if(ARES_RECORD_ANNOUNCE)
- new_title = "[record.title] at [record.time]"
- new_details = record.details
- records_announcement -= record
- if(ARES_RECORD_SECURITY, ARES_RECORD_ANTIAIR)
- new_title = "[record.title] at [record.time]"
- new_details = record.details
- records_security -= record
- if(ARES_RECORD_BIOSCAN)
- new_title = "[record.title] at [record.time]"
- new_details = record.details
- records_bioscan -= record
- if(ARES_RECORD_BOMB)
- new_title = "[record.title] at [record.time]"
- new_details = "[record.details] Launched by [record.user]."
- records_bombardment -= record
-
- new_delete.details = new_details
- new_delete.user = last_login
- new_delete.title = new_title
-
- records_deletion += new_delete
-
- // -- 1:1 Conversation -- //
- if("new_conversation")
- var/datum/ares_record/talk_log/convo = new(last_login)
- convo.conversation += "[MAIN_AI_SYSTEM] at [worldtime2text()], 'New 1:1 link initiated. Greetings, [last_login].'"
- records_talking += convo
-
- if("clear_conversation")
- var/datum/ares_record/talk_log/conversation = locate(params["active_convo"])
- if(!istype(conversation))
- return FALSE
- var/datum/ares_record/deleted_talk/deleted = new
- deleted.title = conversation.title
- deleted.conversation = conversation.conversation
- deleted.user = conversation.user
- records_deletion += deleted
- records_talking -= conversation
-
- if("message_ares")
- var/message = tgui_input_text(usr, "What do you wish to say to ARES?", "ARES Message", encode = FALSE)
- if(message)
- message_ares(message, usr, params["active_convo"])
-
- if("read_record")
- var/datum/ares_record/deleted_talk/conversation = locate(params["record"])
- deleted_1to1 = conversation.conversation
- last_menu = current_menu
- current_menu = "read_deleted"
-
- // -- Emergency Buttons -- //
- if("general_quarters")
- if(!COOLDOWN_FINISHED(src, ares_quarters_cooldown))
- to_chat(usr, SPAN_WARNING("It has not been long enough since the last General Quarters call!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(security_level < SEC_LEVEL_RED)
- set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)
- shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
- log_game("[key_name(usr)] has called for general quarters via ARES.")
- message_admins("[key_name_admin(usr)] has called for general quarters via ARES.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.")
- COOLDOWN_START(src, ares_quarters_cooldown, 10 MINUTES)
- . = TRUE
-
- if("evacuation_start")
- if(security_level < SEC_LEVEL_RED)
- to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- if(EvacuationAuthority.flags_scuttle & FLAGS_EVACUATION_DENY)
- to_chat(usr, SPAN_WARNING("The USCM has placed a lock on deploying the evacuation pods."))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- if(!EvacuationAuthority.initiate_evacuation())
- to_chat(usr, SPAN_WARNING("You are unable to initiate an evacuation procedure right now!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- log_game("[key_name(usr)] has called for an emergency evacuation via ARES.")
- message_admins("[key_name_admin(usr)] has called for an emergency evacuation via ARES.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Initiate Evacuation", "[last_login] has called for an emergency evacuation via ARES.")
- . = TRUE
-
- if("distress")
- if(!SSticker.mode)
- return FALSE //Not a game mode?
- if(world.time < DISTRESS_TIME_LOCK)
- to_chat(usr, SPAN_WARNING("You have been here for less than six minutes... what could you possibly have done!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(!COOLDOWN_FINISHED(src, ares_distress_cooldown))
- to_chat(usr, SPAN_WARNING("The distress launcher is cooling down!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(security_level == SEC_LEVEL_DELTA)
- to_chat(usr, SPAN_WARNING("The ship is already undergoing self destruct procedures!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- else if(security_level < SEC_LEVEL_RED)
- to_chat(usr, SPAN_WARNING("The ship must be under red alert to launch a distress beacon!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- for(var/client/admin in GLOB.admins)
- if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
- playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
- SSticker.mode.request_ert(usr, TRUE)
- to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM High Command."))
- COOLDOWN_START(src, ares_distress_cooldown, COOLDOWN_COMM_REQUEST)
- return TRUE
-
- if("nuclearbomb")
- if(!SSticker.mode)
- return FALSE //Not a game mode?
- if(world.time < NUCLEAR_TIME_LOCK)
- to_chat(usr, SPAN_WARNING("It is too soon to request Nuclear Ordnance!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(!COOLDOWN_FINISHED(src, ares_nuclear_cooldown))
- to_chat(usr, SPAN_WARNING("The ordnance request frequency is garbled, wait for reset!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
- to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- var/reason = tgui_input_text(usr, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
- if(!reason)
- return FALSE
- for(var/client/admin in GLOB.admins)
- if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
- playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: [reason] [CC_MARK(usr)] (APPROVE) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
- to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
- if(ares_can_log())
- link.log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
- if(ares_can_interface())
- ai_silent_announcement("[last_login] has sent a request for nuclear ordnance to USCM High Command.", ".V")
- ai_silent_announcement("Reason given: [reason].", ".V")
- COOLDOWN_START(src, ares_nuclear_cooldown, COOLDOWN_COMM_DESTRUCT)
- return TRUE
-// ------ End ARES Interface UI ------ //
-
-
/obj/structure/machinery/computer/working_joe/get_ares_access(obj/item/card/id/card)
if(ACCESS_ARES_DEBUG in card.access)
return APOLLO_ACCESS_DEBUG
@@ -639,369 +239,3 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
return "Working Joe"
if(APOLLO_ACCESS_DEBUG)//6
return "AI Service Technician"
-
-// ------ Maintenance Controller UI ------ //
-/obj/structure/machinery/computer/working_joe/attack_hand(mob/user as mob)
- if(..() || !allowed(usr) || inoperable())
- return FALSE
-
- tgui_interact(user)
- return TRUE
-
-/obj/structure/machinery/computer/working_joe/tgui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
- ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "WorkingJoe", name)
- ui.open()
-
-/obj/structure/machinery/computer/working_joe/ui_data(mob/user)
- var/list/data = list()
-
- data["current_menu"] = current_menu
- data["last_page"] = last_menu
-
- data["logged_in"] = last_login
-
- data["access_text"] = "access level [authentication], [ares_auth_to_text(authentication)]."
- data["access_level"] = authentication
-
- data["alert_level"] = security_level
- data["worldtime"] = world.time
-
- data["access_log"] = list()
- data["access_log"] += login_list
-
- data["apollo_log"] = list()
- data["apollo_log"] += link.apollo_log
-
- var/list/logged_maintenance = list()
- for(var/datum/ares_ticket/maintenance/maint_ticket as anything in link.tickets_maintenance)
- if(!istype(maint_ticket))
- continue
- var/lock_status = TICKET_OPEN
- switch(maint_ticket.ticket_status)
- if(TICKET_REJECTED, TICKET_CANCELLED, TICKET_COMPLETED)
- lock_status = TICKET_CLOSED
-
- var/list/current_maint = list()
- current_maint["id"] = maint_ticket.ticket_id
- current_maint["time"] = maint_ticket.ticket_time
- current_maint["priority_status"] = maint_ticket.ticket_priority
- current_maint["category"] = maint_ticket.ticket_name
- current_maint["details"] = maint_ticket.ticket_details
- current_maint["status"] = maint_ticket.ticket_status
- current_maint["submitter"] = maint_ticket.ticket_submitter
- current_maint["assignee"] = maint_ticket.ticket_assignee
- current_maint["lock_status"] = lock_status
- current_maint["ref"] = "\ref[maint_ticket]"
- logged_maintenance += list(current_maint)
- data["maintenance_tickets"] = logged_maintenance
-
- var/list/logged_access = list()
- var/list/requesting_access = list()
- for(var/datum/ares_ticket/access/access_ticket as anything in link.tickets_access)
- var/lock_status = TICKET_OPEN
- switch(access_ticket.ticket_status)
- if(TICKET_REJECTED, TICKET_CANCELLED, TICKET_REVOKED)
- lock_status = TICKET_CLOSED
-
- var/list/current_ticket = list()
- current_ticket["id"] = access_ticket.ticket_id
- current_ticket["time"] = access_ticket.ticket_time
- current_ticket["priority_status"] = access_ticket.ticket_priority
- current_ticket["title"] = access_ticket.ticket_name
- current_ticket["details"] = access_ticket.ticket_details
- current_ticket["status"] = access_ticket.ticket_status
- current_ticket["submitter"] = access_ticket.ticket_submitter
- current_ticket["assignee"] = access_ticket.ticket_assignee
- current_ticket["lock_status"] = lock_status
- current_ticket["ref"] = "\ref[access_ticket]"
- logged_access += list(current_ticket)
-
- if(lock_status == TICKET_OPEN)
- requesting_access += access_ticket.ticket_name
- data["access_tickets"] = logged_access
-
- return data
-
-/obj/structure/machinery/computer/working_joe/ui_static_data(mob/user)
- var/list/data = list()
-
- data["link_id"] = link_id
-
- return data
-
-/obj/structure/machinery/computer/working_joe/ui_status(mob/user, datum/ui_state/state)
- . = ..()
- if(!allowed(user))
- return UI_UPDATE
- if(inoperable())
- return UI_DISABLED
-
-/obj/structure/machinery/computer/working_joe/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
- . = ..()
- if(.)
- return
-
- var/playsound = TRUE
- var/mob/living/carbon/human/operator = usr
-
- switch (action)
- if("go_back")
- if(!last_menu)
- return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
- var/temp_holder = current_menu
- current_menu = last_menu
- last_menu = temp_holder
-
- if("login")
-
- var/obj/item/card/id/idcard = operator.get_active_hand()
- if(istype(idcard))
- authentication = get_ares_access(idcard)
- last_login = idcard.registered_name
- else if(operator.wear_id)
- idcard = operator.wear_id
- if(istype(idcard))
- authentication = get_ares_access(idcard)
- last_login = idcard.registered_name
- else
- to_chat(operator, SPAN_WARNING("You require an ID card to access this terminal!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(authentication)
- login_list += "[last_login] at [worldtime2text()], Access Level [authentication] - [ares_auth_to_text(authentication)]."
- current_menu = "main"
-
- if("logout")
- last_menu = current_menu
- current_menu = "login"
- login_list += "[last_login] logged out at [worldtime2text()]."
-
- if("home")
- last_menu = current_menu
- current_menu = "main"
- if("page_logins")
- last_menu = current_menu
- current_menu = "login_records"
- if("page_apollo")
- last_menu = current_menu
- current_menu = "apollo"
- if("page_request")
- last_menu = current_menu
- current_menu = "access_requests"
- if("page_report")
- last_menu = current_menu
- current_menu = "maint_reports"
- if("page_tickets")
- last_menu = current_menu
- current_menu = "access_tickets"
- if("page_maintenance")
- last_menu = current_menu
- current_menu = "maint_claim"
-
- if("new_report")
- var/priority_report = FALSE
- var/maint_type = tgui_input_list(operator, "What is the type of maintenance item you wish to report?", "Report Category", GLOB.maintenance_categories, 30 SECONDS)
- switch(maint_type)
- if("Major Structural Damage", "Fire", "Communications Failure", "Power Generation Failure")
- priority_report = TRUE
-
- if(!maint_type)
- return FALSE
- var/details = tgui_input_text(operator, "What are the details for this report?", "Ticket Details", encode = FALSE)
- if(!details)
- return FALSE
-
- if((authentication >= APOLLO_ACCESS_REPORTER) && !priority_report)
- var/is_priority = tgui_alert(operator, "Is this a priority report?", "Priority designation", list("Yes", "No"))
- if(is_priority == "Yes")
- priority_report = TRUE
-
- var/confirm = alert(operator, "Please confirm the submission of your maintenance report. \n\n Priority: [priority_report ? "Yes" : "No"] \n Category: '[maint_type]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
- if(confirm == "Yes")
- if(link)
- var/datum/ares_ticket/maintenance/maint_ticket = new(last_login, maint_type, details, priority_report)
- link.tickets_maintenance += maint_ticket
- if(priority_report)
- ares_apollo_talk("Priority Maintenance Report: [maint_type] - ID [maint_ticket.ticket_id]. Seek and resolve.")
- log_game("ARES: Maintenance Ticket '\ref[maint_ticket]' created by [key_name(operator)] as [last_login] with Category '[maint_type]' and Details of '[details]'.")
- return TRUE
- return FALSE
-
- if("claim_ticket")
- var/datum/ares_ticket/ticket = locate(params["ticket"])
- if(!istype(ticket))
- return FALSE
- var/claim = TRUE
- var/assigned = ticket.ticket_assignee
- if(assigned)
- if(assigned == last_login)
- var/prompt = tgui_alert(usr, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
- if(prompt != "Yes")
- return FALSE
- /// set ticket back to pending
- ticket.ticket_assignee = null
- ticket.ticket_status = TICKET_PENDING
- return claim
- var/choice = tgui_alert(usr, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
- if(choice != "Yes")
- claim = FALSE
- if(claim)
- ticket.ticket_assignee = last_login
- ticket.ticket_status = TICKET_ASSIGNED
- return claim
-
- if("cancel_ticket")
- var/datum/ares_ticket/ticket = locate(params["ticket"])
- if(!istype(ticket))
- return FALSE
- if(ticket.ticket_submitter != last_login)
- to_chat(usr, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
- return FALSE
- to_chat(usr, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
- ticket.ticket_status = TICKET_CANCELLED
- if(ticket.ticket_priority)
- ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been cancelled.")
- return TRUE
-
- if("mark_ticket")
- var/datum/ares_ticket/ticket = locate(params["ticket"])
- if(!istype(ticket))
- return FALSE
- if(ticket.ticket_assignee != last_login && ticket.ticket_assignee) //must be claimed by you or unclaimed.)
- to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
- return FALSE
- var/choice = tgui_alert(usr, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
- switch(choice)
- if(TICKET_COMPLETED)
- ticket.ticket_status = TICKET_COMPLETED
- if(TICKET_REJECTED)
- ticket.ticket_status = TICKET_REJECTED
- else
- return FALSE
- if(ticket.ticket_priority)
- ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been [choice] by [last_login].")
- to_chat(usr, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
- return TRUE
-
- if("new_access")
- var/obj/item/card/id/idcard = operator.get_active_hand()
- var/has_id = FALSE
- if(istype(idcard))
- has_id = TRUE
- else if(operator.wear_id)
- idcard = operator.wear_id
- if(istype(idcard))
- has_id = TRUE
- if(!has_id)
- to_chat(operator, SPAN_WARNING("You require an ID card to request an access ticket!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
- if(idcard.registered_name != last_login)
- to_chat(operator, SPAN_WARNING("This ID card does not match the active login!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- var/ticket_holder = last_login
- if(!ticket_holder)
- return FALSE
- var/details = tgui_input_text(operator, "What is the purpose of this access ticket?", "Ticket Details", encode = FALSE)
- if(!details)
- return FALSE
-
- var/confirm = alert(operator, "Please confirm the submission of your access ticket request. \n\nHolder: '[ticket_holder]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
- if(confirm != "Yes" || !link)
- return FALSE
- var/datum/ares_ticket/access/access_ticket = new(last_login, ticket_holder, details, FALSE, idcard.registered_gid)
- link.waiting_ids += idcard
- link.tickets_access += access_ticket
- log_game("ARES: Access Ticket '\ref[access_ticket]' created by [key_name(operator)] as [last_login] with Holder '[ticket_holder]' and Details of '[details]'.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(operator)] created a new ARES Access Ticket."), 1)
- return TRUE
-
- if("return_access")
- playsound = FALSE
- var/datum/ares_ticket/access/access_ticket
- for(var/datum/ares_ticket/access/possible_ticket in link.tickets_access)
- if(possible_ticket.ticket_status != TICKET_GRANTED)
- continue
- if(possible_ticket.ticket_name != last_login)
- continue
- access_ticket = possible_ticket
- break
-
- for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
- if(identification.registered_gid != access_ticket.user_id_num)
- continue
-
- access_ticket.ticket_status = TICKET_RETURNED
- identification.access -= ACCESS_MARINE_AI_TEMP
- identification.modification_log += "Temporary AI Access self-returned by [key_name(operator)]."
-
- to_chat(operator, SPAN_NOTICE("Temporary Access Ticket surrendered."))
- playsound(src, 'sound/machines/chime.ogg', 15, 1)
- ares_apollo_talk("[last_login] surrendered their access ticket.")
-
- authentication = get_ares_access(identification)
- if(authentication)
- login_list += "[last_login] at [worldtime2text()], Surrendered Temporary Access Ticket."
- return TRUE
-
- to_chat(operator, SPAN_WARNING("This ID card does not have an access ticket!"))
- playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
- return FALSE
-
- if("auth_access")
- playsound = FALSE
- var/datum/ares_ticket/access/access_ticket = locate(params["ticket"])
- if(!access_ticket)
- return FALSE
- for(var/obj/item/card/id/identification in link.waiting_ids)
- if(!istype(identification))
- continue
- if(identification.registered_gid != access_ticket.user_id_num)
- continue
- identification.handle_ares_access(last_login, operator)
- access_ticket.ticket_status = TICKET_GRANTED
- playsound(src, 'sound/machines/chime.ogg', 15, 1)
- return TRUE
- for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
- if(identification.registered_gid != access_ticket.user_id_num)
- continue
- identification.handle_ares_access(last_login, operator)
- access_ticket.ticket_status = TICKET_REVOKED
- playsound(src, 'sound/machines/chime.ogg', 15, 1)
- return TRUE
- return FALSE
-
- if(playsound)
- playsound(src, "keyboard_alt", 15, 1)
-
-/obj/item/card/id/proc/handle_ares_access(logged_in, mob/user)
- var/announce_text = "[logged_in] revoked core access from [registered_name]'s ID card."
- var/operator = key_name(user)
- var/datum/ares_link/link = GLOB.ares_link
- if(logged_in == MAIN_AI_SYSTEM)
- if(!user)
- operator = "[MAIN_AI_SYSTEM] (Sensor Trip)"
- else
- operator = "[user.ckey]/([MAIN_AI_SYSTEM])"
- if(ACCESS_MARINE_AI_TEMP in access)
- access -= ACCESS_MARINE_AI_TEMP
- link.active_ids -= src
- modification_log += "Temporary AI access revoked by [operator]"
- to_chat(user, SPAN_NOTICE("Access revoked from [registered_name]."))
- else
- access += ACCESS_MARINE_AI_TEMP
- modification_log += "Temporary AI access granted by [operator]"
- announce_text = "[logged_in] granted core access to [registered_name]'s ID card."
- to_chat(user, SPAN_NOTICE("Access granted to [registered_name]."))
- link.waiting_ids -= src
- link.active_ids += src
- ares_apollo_talk(announce_text)
- return TRUE
diff --git a/code/game/machinery/ARES/ARES_step_triggers.dm b/code/game/machinery/ARES/ARES_step_triggers.dm
index 335a877f9f25..818d1e7145ad 100644
--- a/code/game/machinery/ARES/ARES_step_triggers.dm
+++ b/code/game/machinery/ARES/ARES_step_triggers.dm
@@ -3,7 +3,6 @@
layer = 5
/// Link alerts to ARES Link
var/datum/ares_link/link
- var/link_id = MAIN_SHIP_DEFAULT_NAME
/// Alert message to report unless area based.
var/alert_message = "ALERT: Unauthorized movement detected in ARES Core!"
/// Connect alerts to use same cooldowns
@@ -53,7 +52,7 @@
/obj/effect/step_trigger/ares_alert/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
if(link && !override)
return FALSE
- if(new_link.link_id == link_id)
+ if(new_link)
link = new_link
new_link.linked_alerts += src
return TRUE
@@ -70,7 +69,7 @@
broadcast_message = "ALERT: Unauthorized movement detected in [area_name]!"
var/datum/ares_link/link = GLOB.ares_link
- if(link.p_apollo.inoperable())
+ if(link.processor_apollo.inoperable())
return FALSE
to_chat(passer, SPAN_BOLDWARNING("You hear a soft beeping sound as you cross the threshold."))
@@ -113,8 +112,6 @@
/obj/effect/step_trigger/ares_alert/access_control/Crossed(atom/passer as mob|obj)
if(isobserver(passer) || isxeno(passer))
return FALSE
- if(!COOLDOWN_FINISHED(src, sensor_cooldown))//Don't want alerts spammed.
- return FALSE
if(!passer)
return FALSE
if(passer.alpha <= 100)//Can't be seen/detected to trigger alert.
@@ -157,11 +154,12 @@
var/broadcast_message = get_broadcast(passer, idcard, failure)
var/datum/ares_link/link = GLOB.ares_link
- if(link.p_apollo.inoperable())
+ if(link.processor_apollo.inoperable())
return FALSE
to_chat(passer, SPAN_BOLDWARNING("You hear a harsh buzzing sound as you cross the threshold!"))
- ares_apollo_talk(broadcast_message)
+ if(COOLDOWN_FINISHED(src, sensor_cooldown))//Don't want alerts spammed.
+ ares_apollo_talk(broadcast_message)
if(idcard)
/// Removes the access from the ID and updates the ID's modification log.
for(var/obj/item/card/id/identification in link.active_ids)
diff --git a/code/game/machinery/biohazard_lockdown.dm b/code/game/machinery/biohazard_lockdown.dm
index fd6205baa1d9..b598c4b2a009 100644
--- a/code/game/machinery/biohazard_lockdown.dm
+++ b/code/game/machinery/biohazard_lockdown.dm
@@ -102,8 +102,9 @@ GLOBAL_VAR_INIT(lockdown_state, LOCKDOWN_READY)
shipwide_ai_announcement(message, MAIN_AI_SYSTEM, 'sound/effects/biohazard.ogg')
message_admins(log)
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Containment Lockdown", ares_log)
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_security("Containment Lockdown", ares_log)
#undef LOCKDOWN_READY
#undef LOCKDOWN_ACTIVE
diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm
index c3b17dbf8090..e413b56757c7 100644
--- a/code/game/machinery/computer/almayer_control.dm
+++ b/code/game/machinery/computer/almayer_control.dm
@@ -108,7 +108,7 @@
. = ..()
if(.)
return
-
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
switch(action)
if("award")
print_medal(usr, src)
@@ -131,8 +131,8 @@
log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
+ if(ares_can_log())
+ datacore.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
. = TRUE
if("evacuation_cancel")
@@ -144,8 +144,8 @@
log_game("[key_name(usr)] has canceled the emergency evacuation.")
message_admins("[key_name_admin(usr)] has canceled the emergency evacuation.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
+ if(ares_can_log())
+ datacore.log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
. = TRUE
// evac stuff end \\
@@ -167,8 +167,8 @@
set_security_level(seclevel2num(level_selected), log = ARES_LOG_NONE)
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Manual Security Update", "[usr] has changed the security level to [get_security_level()].")
+ if(ares_can_log())
+ datacore.log_ares_security("Manual Security Update", "[usr] has changed the security level to [get_security_level()].")
. = TRUE
if("messageUSCM")
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index f7ea31fba36a..83531d65bff3 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -65,7 +65,7 @@
if(..()) return FALSE
usr.set_interaction(src)
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
switch(href_list["operation"])
if("mapview")
tacmap.tgui_interact(usr)
@@ -149,7 +149,8 @@
log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
- link.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
+ if(ares_can_log())
+ datacore.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
return TRUE
state = STATE_EVACUATION
@@ -169,7 +170,8 @@
log_game("[key_name(usr)] has canceled the emergency evacuation.")
message_admins("[key_name_admin(usr)] has canceled the emergency evacuation.")
- link.log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
+ if(ares_can_log())
+ datacore.log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
return TRUE
state = STATE_EVACUATION_CANCEL
diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm
index fc9bb015ece0..69eb8b90aea4 100644
--- a/code/game/objects/items/devices/cictablet.dm
+++ b/code/game/objects/items/devices/cictablet.dm
@@ -145,8 +145,9 @@
log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
. = TRUE
if("distress")
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index 3d774cedc616..03d6aa1796df 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -1020,7 +1020,7 @@ var/datum/controller/supply/supply_controller = new()
to_chat(usr, SPAN_DANGER("Current retrieval load has reached maximum capacity."))
return
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
for(var/i=1, i<=supply_controller.requestlist.len, i++)
var/datum/supply_order/SO = supply_controller.requestlist[i]
if(SO.ordernum == ordernum)
@@ -1046,7 +1046,8 @@ var/datum/controller/supply/supply_controller = new()
pack_source = "Unknown"
if(prob(90))
pack_name = "Unknown"
- link.log_ares_requisition(pack_source, pack_name, usr.name)
+ if(ares_can_log())
+ datacore.log_ares_requisition(pack_source, pack_name, usr.name)
else
temp = "Not enough money left.
"
temp += "
Back Main Menu"
diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm
index 79c0a03a7589..247ab5c241ce 100644
--- a/code/modules/admin/tabs/event_tab.dm
+++ b/code/modules/admin/tabs/event_tab.dm
@@ -597,9 +597,9 @@
return FALSE
var/datum/ares_link/link = GLOB.ares_link
- if(link.p_apollo.inoperable())
+ if(link.processor_apollo.inoperable())
var/prompt = tgui_alert(src, "ARES APOLLO processor is offline or destroyed, send the message anyways?", "Choose.", list("Yes", "No"), 20 SECONDS)
- if(prompt == "No")
+ if(prompt != "Yes")
to_chat(usr, SPAN_WARNING("[MAIN_AI_SYSTEM] is not responding. It's APOLLO processor may be offline or destroyed."))
return FALSE
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm
index 4c7e6afa5b7b..6db984dad217 100644
--- a/code/modules/admin/topic/topic.dm
+++ b/code/modules/admin/topic/topic.dm
@@ -1948,7 +1948,7 @@
supply_controller.shoppinglist += new_order
//Can no longer request a nuke
- GLOB.ares_link.interface.nuke_available = FALSE
+ GLOB.ares_datacore.nuke_available = FALSE
marine_announcement("A nuclear device has been authorized by High Command and will be delivered to requisitions via ASRS.", "NUCLEAR ORDNANCE AUTHORIZED", 'sound/misc/notice2.ogg', logging = ARES_LOG_MAIN)
log_game("[key_name_admin(usr)] has authorized a [nuketype], requested by [key_name_admin(ref_person)]")
diff --git a/code/modules/cm_marines/anti_air.dm b/code/modules/cm_marines/anti_air.dm
index cdb162cddfa3..f139fdead0c5 100644
--- a/code/modules/cm_marines/anti_air.dm
+++ b/code/modules/cm_marines/anti_air.dm
@@ -102,7 +102,7 @@ var/obj/structure/anti_air_cannon/almayer_aa_cannon
if(!almayer_aa_cannon)
return
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
switch(action)
if("protect")
almayer_aa_cannon.protecting_section = params["section_id"]
@@ -110,12 +110,14 @@ var/obj/structure/anti_air_cannon/almayer_aa_cannon
almayer_aa_cannon.protecting_section = ""
return
message_admins("[key_name(usr)] has set the AA to [html_encode(almayer_aa_cannon.protecting_section)].")
- link.log_ares_antiair("[usr] Set AA to cover [html_encode(almayer_aa_cannon.protecting_section)].")
+ if(ares_can_log())
+ datacore.log_ares_antiair("[usr] Set AA to cover [html_encode(almayer_aa_cannon.protecting_section)].")
. = TRUE
if("deactivate")
almayer_aa_cannon.protecting_section = ""
message_admins("[key_name(usr)] has deactivated the AA cannon.")
- link.log_ares_antiair("[usr] Deactivated Anti Air systems.")
+ if(ares_can_log())
+ datacore.log_ares_antiair("[usr] Deactivated Anti Air systems.")
. = TRUE
add_fingerprint(usr)
diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm
index d2d55a8cadb1..e79477eb80b5 100644
--- a/code/modules/cm_marines/overwatch.dm
+++ b/code/modules/cm_marines/overwatch.dm
@@ -798,7 +798,9 @@
log_attack("[key_name(user)] fired an orbital bombardment in [A.name] for squad '[current_squad]'")
/// Project ARES interface log.
- GLOB.ares_link.log_ares_bombardment(user.name, ob_name, "X[x_bomb], Y[y_bomb] in [A.name]")
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_bombardment(user.name, ob_name, "X[x_bomb], Y[y_bomb] in [A.name]")
busy = FALSE
var/turf/target = locate(T.x + rand(-3, 3), T.y + rand(-3, 3), T.z)
diff --git a/code/modules/mob/living/carbon/xenomorph/death.dm b/code/modules/mob/living/carbon/xenomorph/death.dm
index d81413b68651..dd83b26835a8 100644
--- a/code/modules/mob/living/carbon/xenomorph/death.dm
+++ b/code/modules/mob/living/carbon/xenomorph/death.dm
@@ -124,8 +124,9 @@
// Tell the marines where the last one is.
var/name = "[MAIN_AI_SYSTEM] Bioscan Status"
var/input = "Bioscan complete.\n\nSensors indicate one remaining unknown lifeform signature in [get_area(X)]."
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_bioscan(name, input)
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_bioscan(name, input)
marine_announcement(input, name, 'sound/AI/bioscan.ogg', logging = ARES_LOG_NONE)
// Tell the xeno she is the last one.
if(X.client)
diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm
index c7a79b9c44ca..9ff0fe22c98a 100644
--- a/code/modules/shuttle/computers/dropship_computer.dm
+++ b/code/modules/shuttle/computers/dropship_computer.dm
@@ -272,8 +272,9 @@
GLOB.alt_ctrl_disabled = TRUE
marine_announcement("Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.", "Dropship Alert", 'sound/AI/hijack.ogg', logging = ARES_LOG_SECURITY)
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_flight("Unknown", "Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.")
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_flight("Unknown", "Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.")
var/mob/living/carbon/xenomorph/xeno = user
var/hivenumber = XENO_HIVE_NORMAL
@@ -352,7 +353,7 @@
to_chat(user, SPAN_WARNING("The dropship isn't responding to controls."))
return
- var/datum/ares_link/link = GLOB.ares_link
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
switch(action)
if("move")
if(shuttle.mode != SHUTTLE_IDLE && (shuttle.mode != SHUTTLE_CALL && !shuttle.destination))
@@ -369,7 +370,8 @@
update_equipment(is_optimised)
if(is_set_flyby)
to_chat(user, SPAN_NOTICE("You begin the launch sequence for a flyby."))
- link.log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flyby.")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flyby.")
var/log = "[key_name(user)] launched the dropship [src.shuttleId] on flyby."
msg_admin_niche(log)
log_interact(user, msg = "[log]")
@@ -398,7 +400,8 @@
return TRUE
SSshuttle.moveShuttle(shuttle.id, dock.id, TRUE)
to_chat(user, SPAN_NOTICE("You begin the launch sequence to [dock]."))
- link.log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flight to [dock].")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flight to [dock].")
var/log = "[key_name(user)] launched the dropship [src.shuttleId] on transport."
msg_admin_niche(log)
log_interact(user, msg = "[log]")
@@ -418,13 +421,15 @@
to_chat(user, SPAN_WARNING("Door controls have been overridden. Please call technical support."))
if("set-ferry")
is_set_flyby = FALSE
- link.log_ares_flight(user.name, "Set Dropship [shuttle.name] to transport runs.")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Set Dropship [shuttle.name] to transport runs.")
var/log = "[key_name(user)] set the dropship [src.shuttleId] into transport"
msg_admin_niche(log)
log_interact(user, msg = "[log]")
if("set-flyby")
is_set_flyby = TRUE
- link.log_ares_flight(user.name, "Set Dropship [shuttle.name] to flyby runs.")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Set Dropship [shuttle.name] to flyby runs.")
var/log = "[key_name(user)] set the dropship [src.shuttleId] into flyby."
msg_admin_niche(log)
log_interact(user, msg = "[log]")
@@ -447,7 +452,8 @@
shuttle.automated_lz_id = ground_lz
shuttle.automated_delay = delay
playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1)
- link.log_ares_flight(user.name, "Enabled autopilot for Dropship [shuttle.name].")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Enabled autopilot for Dropship [shuttle.name].")
var/log = "[key_name(user)] has enabled auto pilot on '[shuttle.name]'"
message_admins(log)
log_interact(user, msg = "[log]")
@@ -464,7 +470,8 @@
shuttle.automated_lz_id = null
shuttle.automated_delay = null
playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1)
- link.log_ares_flight(user.name, "Disabled autopilot for Dropship [shuttle.name].")
+ if(ares_can_log())
+ datacore.log_ares_flight(user.name, "Disabled autopilot for Dropship [shuttle.name].")
var/log = "[key_name(user)] has disabled auto pilot on '[shuttle.name]'"
message_admins(log)
log_interact(user, msg = "[log]")
diff --git a/code/modules/shuttles/marine_ferry.dm b/code/modules/shuttles/marine_ferry.dm
index 426d90c1457a..8a1fbb26f6fa 100644
--- a/code/modules/shuttles/marine_ferry.dm
+++ b/code/modules/shuttles/marine_ferry.dm
@@ -102,8 +102,9 @@
automated_launch = FALSE
automated_launch_timer = TIMER_ID_NULL
ai_silent_announcement("Dropship '[name]' departing.")
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_flight("Automated", "Dropship [name] launched on an automatic flight.")
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_flight("Automated", "Dropship [name] launched on an automatic flight.")
/*
diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm
index 12356754872c..6c327fe9dd5a 100644
--- a/code/modules/shuttles/shuttle_console.dm
+++ b/code/modules/shuttles/shuttle_console.dm
@@ -293,8 +293,9 @@ GLOBAL_LIST_EMPTY(shuttle_controls)
marine_announcement("Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.", "Dropship Alert", 'sound/AI/hijack.ogg', logging = ARES_LOG_SECURITY)
shuttle.alerts_allowed--
- var/datum/ares_link/link = GLOB.ares_link
- link.log_ares_flight("Unknown", "Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.")
+ var/datum/ares_datacore/datacore = GLOB.ares_datacore
+ if(ares_can_log())
+ datacore.log_ares_flight("Unknown", "Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.")
to_chat(Q, SPAN_DANGER("A loud alarm erupts from [src]! The fleshy hosts must know that you can access it!"))
xeno_message(SPAN_XENOANNOUNCE("The Queen has commanded the metal bird to depart for the metal hive in the sky! Rejoice!"),3,Q.hivenumber)
diff --git a/colonialmarines.dme b/colonialmarines.dme
index 79ddef81b976..c9036835aea2 100644
--- a/colonialmarines.dme
+++ b/colonialmarines.dme
@@ -795,6 +795,8 @@ s// DM Environment file for colonialmarines.dme.
#include "code\game\machinery\washing_machine.dm"
#include "code\game\machinery\weather_siren.dm"
#include "code\game\machinery\ARES\ARES.dm"
+#include "code\game\machinery\ARES\ARES_interface.dm"
+#include "code\game\machinery\ARES\ARES_interface_apollo.dm"
#include "code\game\machinery\ARES\ARES_procs.dm"
#include "code\game\machinery\ARES\ARES_records.dm"
#include "code\game\machinery\ARES\ARES_step_triggers.dm"