Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
x
  • Loading branch information
realforest2001 committed Oct 9, 2023
1 parent 232cfa2 commit b77d88e
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 97 deletions.
28 changes: 12 additions & 16 deletions code/defines/procs/announcement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@
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)

if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)
switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)

else if(faction_to_display == "Everyone (-Yautja)")
for(var/mob/M in targets)
Expand Down Expand Up @@ -97,12 +96,11 @@
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)

if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
if(ARES_LOG_SECURITY)
log_ares_security("[MAIN_AI_SYSTEM] Security Update", message)
switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
if(ARES_LOG_SECURITY)
log_ares_security("[MAIN_AI_SYSTEM] Security Update", message)

/proc/ai_silent_announcement(message, channel_prefix, bypass_cooldown = FALSE)
if(!message)
Expand Down Expand Up @@ -133,8 +131,7 @@

if(!isnull(signature))
message += "<br><br><i> Signed by, <br> [signature]</i>"
if(ares_can_log())
log_ares_announcement(title, message)
log_ares_announcement(title, message)

announcement_helper(message, title, targets, sound_to_play)

Expand All @@ -147,8 +144,7 @@
if(!ishuman(T) || isyautja(T) || !is_mainship_level(T.z))
targets.Remove(T)

if(ares_can_log())
log_ares_announcement("[title] Shipwide Update", message)
log_ares_announcement("[title] Shipwide Update", message)

announcement_helper(message, title, targets, sound_to_play)

Expand Down
6 changes: 2 additions & 4 deletions code/game/bioscans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
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())
log_ares_bioscan(name, input)
log_ares_bioscan(name, input)
if(ares_can_interface())
marine_announcement(input, name, 'sound/misc/interference.ogg', logging = ARES_LOG_NONE)
return
Expand All @@ -135,8 +134,7 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)

log_game("BIOSCAN: ARES bioscan completed. [input]")

if(ares_can_log())
log_ares_bioscan(name, input) //if interface is down, bioscan still logged, just have to go read it.
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
Expand Down
3 changes: 1 addition & 2 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,7 @@
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: <b>[reason]</b> [CC_MARK(usr)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukeapprove=\ref[usr]'>APPROVE</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukedeny=\ref[usr]'>DENY</A>) [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())
log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
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")
Expand Down
78 changes: 45 additions & 33 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,74 +77,86 @@ GLOBAL_LIST_INIT(maintenance_categories, list(


// ------ ARES Logging Procs ------ //
/proc/log_ares_apollo(speaker, message)
if(!speaker)
speaker = "Unknown"
var/datum/ares_link/link = GLOB.ares_link
var/datum/ares_datacore/datacore = GLOB.ares_datacore
if(!istype(link) || !istype(datacore))
/proc/ares_apollo_talk(broadcast_message)
var/datum/language/apollo/apollo = GLOB.all_languages[LANGUAGE_APOLLO]
for(var/mob/living/silicon/decoy/ship_ai/ai in ai_mob_list)
if(ai.stat == DEAD)
return FALSE
apollo.broadcast(ai, broadcast_message)
for(var/mob/listener in (GLOB.human_mob_list + GLOB.dead_mob_list))
if(listener.hear_apollo())//Only plays sound to mobs and not observers, to reduce spam.
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.processor_interface
if(!istype(GLOB.ares_link))
return FALSE
if(!link.processor_apollo || link.processor_apollo.inoperable())
if(processor && !processor.inoperable())
return TRUE
return FALSE //interface processor not found or is broken

/proc/ares_can_log()
if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore))
return FALSE
var/obj/structure/machinery/ares/cpu/central_processor = GLOB.ares_link.central_processor
if(central_processor && !central_processor.inoperable())
return TRUE
return FALSE //CPU not found or is broken

/proc/log_ares_apollo(speaker, message)
if(!ares_can_log())
return FALSE
var/datum/ares_link/link = GLOB.ares_link
if(!link.processor_apollo || link.processor_apollo.inoperable())
return FALSE
if(!speaker)
speaker = "Unknown"
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.apollo_log.Add("[worldtime2text()]: [speaker], '[message]'")

/proc/log_ares_bioscan(title, input)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bioscan.Add(new /datum/ares_record/bioscan(title, input))

/proc/log_ares_bombardment(user_name, ob_name, coordinates)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, "Bombardment fired at [coordinates].", user_name))

/proc/log_ares_announcement(title, message)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_announcement.Add(new /datum/ares_record/announcement(title, message))

/proc/log_ares_requisition(source, details, user_name)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_asrs.Add(new /datum/ares_record/requisition_log(source, details, user_name))

/proc/log_ares_security(title, details)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_security.Add(new /datum/ares_record/security(title, details))

/proc/log_ares_antiair(details)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_security.Add(new /datum/ares_record/security/antiair(details))

/proc/log_ares_flight(user_name, details)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_flight.Add(new /datum/ares_record/flight(details, user_name))
// ------ End ARES Logging Procs ------ //

/proc/ares_apollo_talk(broadcast_message)
var/datum/language/apollo/apollo = GLOB.all_languages[LANGUAGE_APOLLO]
for(var/mob/living/silicon/decoy/ship_ai/ai in ai_mob_list)
if(ai.stat == DEAD)
return FALSE
apollo.broadcast(ai, broadcast_message)
for(var/mob/listener in (GLOB.human_mob_list + GLOB.dead_mob_list))
if(listener.hear_apollo())//Only plays sound to mobs and not observers, to reduce spam.
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.processor_interface
if(!istype(GLOB.ares_link))
return FALSE
if(processor && !processor.inoperable())
return TRUE
return FALSE //interface processor not found or is broken

/proc/ares_can_log()
if(!istype(GLOB.ares_link) || !istype(GLOB.ares_datacore))
return FALSE
var/obj/structure/machinery/ares/cpu/central_processor = GLOB.ares_link.central_processor
if(central_processor && !central_processor.inoperable())
return TRUE
return FALSE //CPU not found or is broken

// ------ ARES Interface Procs ------ //
/obj/structure/machinery/computer/proc/get_ares_access(obj/item/card/id/card)
if(ACCESS_ARES_DEBUG in card.access)
Expand Down
3 changes: 1 addition & 2 deletions code/game/machinery/biohazard_lockdown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ GLOBAL_VAR_INIT(lockdown_state, LOCKDOWN_READY)

shipwide_ai_announcement(message, MAIN_AI_SYSTEM, 'sound/effects/biohazard.ogg')
message_admins(log)
if(ares_can_log())
log_ares_security("Containment Lockdown", ares_log)
log_ares_security("Containment Lockdown", ares_log)

#undef LOCKDOWN_READY
#undef LOCKDOWN_ACTIVE
9 changes: 3 additions & 6 deletions code/game/machinery/computer/almayer_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@

log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
if(ares_can_log())
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
. = TRUE

if("evacuation_cancel")
Expand All @@ -143,8 +142,7 @@

log_game("[key_name(usr)] has canceled the emergency evacuation.")
message_admins("[key_name_admin(usr)] has canceled the emergency evacuation.")
if(ares_can_log())
log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
. = TRUE

// evac stuff end \\
Expand All @@ -166,8 +164,7 @@
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()].")
if(ares_can_log())
log_ares_security("Manual Security Update", "[usr] has changed the security level to [get_security_level()].")
log_ares_security("Manual Security Update", "[usr] has changed the security level to [get_security_level()].")
. = TRUE

if("messageUSCM")
Expand Down
6 changes: 2 additions & 4 deletions code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@

log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
if(ares_can_log())
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
return TRUE

state = STATE_EVACUATION
Expand All @@ -169,8 +168,7 @@

log_game("[key_name(usr)] has canceled the emergency evacuation.")
message_admins("[key_name_admin(usr)] has canceled the emergency evacuation.")
if(ares_can_log())
log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
log_ares_security("Cancel Evacuation", "[usr] has cancelled the emergency evacuation.")
return TRUE

state = STATE_EVACUATION_CANCEL
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/items/devices/cictablet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@

log_game("[key_name(usr)] has called for an emergency evacuation.")
message_admins("[key_name_admin(usr)] has called for an emergency evacuation.")
if(ares_can_log())
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
log_ares_security("Initiate Evacuation", "[usr] has called for an emergency evacuation.")
. = TRUE

if("distress")
Expand Down
3 changes: 1 addition & 2 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,7 @@ var/datum/controller/supply/supply_controller = new()
pack_source = "Unknown"
if(prob(90))
pack_name = "Unknown"
if(ares_can_log())
log_ares_requisition(pack_source, pack_name, usr.name)
log_ares_requisition(pack_source, pack_name, usr.name)
else
temp = "Not enough money left.<BR>"
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
Expand Down
6 changes: 2 additions & 4 deletions code/modules/cm_marines/anti_air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,12 @@ 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)].")
if(ares_can_log())
log_ares_antiair("[usr] Set AA to cover [html_encode(almayer_aa_cannon.protecting_section)].")
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.")
if(ares_can_log())
log_ares_antiair("[usr] Deactivated Anti Air systems.")
log_ares_antiair("[usr] Deactivated Anti Air systems.")
. = TRUE

add_fingerprint(usr)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,7 @@
log_attack("[key_name(user)] fired an orbital bombardment in [A.name] for squad '[current_squad]'")

/// Project ARES interface log.
if(ares_can_log())
log_ares_bombardment(user.name, ob_name, "X[x_bomb], Y[y_bomb] in [A.name]")
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)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/xenomorph/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@
// 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)]."
if(ares_can_log())
log_ares_bioscan(name, input)
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)
Expand Down
21 changes: 7 additions & 14 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@
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)
if(ares_can_log())
log_ares_flight("Unknown", "Unscheduled dropship departure detected from operational area. Hijack likely. Shutting down autopilot.")
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
Expand Down Expand Up @@ -368,8 +367,7 @@
update_equipment(is_optimised)
if(is_set_flyby)
to_chat(user, SPAN_NOTICE("You begin the launch sequence for a flyby."))
if(ares_can_log())
log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flyby.")
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]")
Expand Down Expand Up @@ -398,8 +396,7 @@
return TRUE
SSshuttle.moveShuttle(shuttle.id, dock.id, TRUE)
to_chat(user, SPAN_NOTICE("You begin the launch sequence to [dock]."))
if(ares_can_log())
log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flight to [dock].")
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]")
Expand All @@ -419,15 +416,13 @@
to_chat(user, SPAN_WARNING("Door controls have been overridden. Please call technical support."))
if("set-ferry")
is_set_flyby = FALSE
if(ares_can_log())
log_ares_flight(user.name, "Set Dropship [shuttle.name] to transport runs.")
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
if(ares_can_log())
log_ares_flight(user.name, "Set Dropship [shuttle.name] to flyby runs.")
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]")
Expand All @@ -450,8 +445,7 @@
shuttle.automated_lz_id = ground_lz
shuttle.automated_delay = delay
playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1)
if(ares_can_log())
log_ares_flight(user.name, "Enabled autopilot for Dropship [shuttle.name].")
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]")
Expand All @@ -468,8 +462,7 @@
shuttle.automated_lz_id = null
shuttle.automated_delay = null
playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1)
if(ares_can_log())
log_ares_flight(user.name, "Disabled autopilot for Dropship [shuttle.name].")
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]")
Expand Down
Loading

0 comments on commit b77d88e

Please sign in to comment.