Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project ARES: Announcement Signatures #6030

Merged
merged 11 commits into from
May 2, 2024
14 changes: 7 additions & 7 deletions code/defines/procs/announcement.dm
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@

switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
log_ares_announcement(title, message, signature)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)
log_ares_security(title, message, signature)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved

else if(faction_to_display == "Everyone (-Yautja)")
for(var/mob/M in targets)
Expand Down Expand Up @@ -103,9 +103,9 @@

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

/proc/ai_silent_announcement(message, channel_prefix, bypass_cooldown = FALSE)
if(!message)
Expand Down Expand Up @@ -138,9 +138,9 @@
message += "<br><br><i> Signed by, <br> [signature]</i>"
switch(ares_logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
log_ares_announcement(title, message, signature)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)
log_ares_security(title, message, signature)

announcement_helper(message, title, targets, sound_to_play)

Expand All @@ -153,7 +153,7 @@
if(!ishuman(T) || isyautja(T) || !is_mainship_level((get_turf(T))?.z))
targets.Remove(T)

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

announcement_helper(message, title, targets, sound_to_play)

Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
log_game("[key_name(user)] has called for general quarters via ARES.")
message_admins("[key_name_admin(user)] has called for general quarters via ARES.")
log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.")
log_ares_security("General Quarters", "Called for general quarters via ARES.", last_login)
COOLDOWN_START(datacore, ares_quarters_cooldown, 10 MINUTES)
. = TRUE

Expand All @@ -442,7 +442,7 @@

log_game("[key_name(user)] has called for an emergency evacuation via ARES.")
message_admins("[key_name_admin(user)] has called for an emergency evacuation via ARES.")
log_ares_security("Initiate Evacuation", "[last_login] has called for an emergency evacuation via ARES.")
log_ares_security("Initiate Evacuation", "Called for an emergency evacuation via ARES.", last_login)
. = TRUE

if("distress")
Expand Down Expand Up @@ -496,7 +496,7 @@
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
message_admins("[key_name(user)] has requested use of Nuclear Ordnance (via ARES)! Reason: <b>[reason]</b> [CC_MARK(user)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukeapprove=\ref[user]'>APPROVE</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukedeny=\ref[user]'>DENY</A>) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
to_chat(user, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command 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]")
log_ares_security("Nuclear Ordnance Request", "Sent a request for nuclear ordnance for the following reason: [reason]", last_login)
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 All @@ -518,7 +518,7 @@
playsound(src, 'sound/machines/chime.ogg', 15, 1)
COOLDOWN_START(sec_vent, vent_trigger_cooldown, COOLDOWN_ARES_VENT)
ares_apollo_talk("Nerve Gas release imminent from [sec_vent.vent_tag].")
log_ares_security("Nerve Gas Release", "[last_login] released Nerve Gas from Vent '[sec_vent.vent_tag]'.")
log_ares_security("Nerve Gas Release", "Released Nerve Gas from Vent '[sec_vent.vent_tag]'.", last_login)
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/ARES/ARES_interface_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,6 @@
playsound(src, 'sound/machines/chime.ogg', 15, 1)
COOLDOWN_START(sec_vent, vent_trigger_cooldown, COOLDOWN_ARES_VENT)
ares_apollo_talk("Nerve Gas release imminent from [sec_vent.vent_tag].")
log_ares_security("Nerve Gas Release", "[MAIN_AI_SYSTEM] released Nerve Gas from Vent '[sec_vent.vent_tag]'.")
log_ares_security("Nerve Gas Release", "Released Nerve Gas from Vent '[sec_vent.vent_tag]'.", MAIN_AI_SYSTEM)
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")
2 changes: 1 addition & 1 deletion code/game/machinery/ARES/ARES_interface_apollo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
playsound(src, 'sound/machines/chime.ogg', 15, 1)
COOLDOWN_START(sec_vent, vent_trigger_cooldown, COOLDOWN_ARES_VENT)
ares_apollo_talk("Nerve Gas release imminent from [sec_vent.vent_tag].")
log_ares_security("Nerve Gas Release", "[last_login] released Nerve Gas from Vent '[sec_vent.vent_tag]'.")
log_ares_security("Nerve Gas Release", "Released Nerve Gas from Vent '[sec_vent.vent_tag]'.", last_login)
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")

Expand Down
14 changes: 10 additions & 4 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,29 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, message, user_name))

/proc/log_ares_announcement(title, message)
/proc/log_ares_announcement(title, message, signature)
if(!ares_can_log())
return FALSE
var/final_msg = message
if(signature)
final_msg = "[signature]: - [final_msg]"
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_announcement.Add(new /datum/ares_record/announcement(title, message))
datacore.records_announcement.Add(new /datum/ares_record/announcement(title, final_msg))

/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)
/proc/log_ares_security(title, details, signature)
if(!ares_can_log())
return FALSE
var/final_msg = details
if(signature)
final_msg = "[signature]: - [final_msg]"
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_security.Add(new /datum/ares_record/security(title, details))
datacore.records_security.Add(new /datum/ares_record/security(title, final_msg))

/proc/log_ares_antiair(details)
if(!ares_can_log())
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/ARES/apollo_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
playsound(src, 'sound/machines/chime.ogg', 15, 1)
COOLDOWN_START(sec_vent, vent_trigger_cooldown, COOLDOWN_ARES_VENT)
ares_apollo_talk("Nerve Gas release imminent from [sec_vent.vent_tag].")
log_ares_security("Nerve Gas Release", "[last_login] released Nerve Gas from Vent '[sec_vent.vent_tag]'.")
log_ares_security("Nerve Gas Release", "Released Nerve Gas from Vent '[sec_vent.vent_tag]'.", last_login)
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")

Expand Down
11 changes: 6 additions & 5 deletions code/game/machinery/aicore_lockdown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,23 @@
return PROC_BLOCKED

var/log = "[key_name(user)] triggered AI core lockdown!"
var/ares_log = "[user.name] triggered triggered AI Core Emergency Lockdown."
var/ares_log = "Triggered triggered AI Core Emergency Lockdown."
var/person = user.name
if(message)
log = "[key_name(user)] triggered AI core emergency lockdown! (Using a custom announcement)."
if(admin)
log += " (Admin Triggered)."
ares_log = "[MAIN_AI_SYSTEM] triggered AI Core Emergency Lockdown."
person = MAIN_AI_SYSTEM

if(GLOB.ares_datacore.ai_lockdown_active)
GLOB.ares_datacore.ai_lockdown_active = FALSE
if(!message)
message = "ATTENTION! \n\nAI CORE EMERGENCY LOCKDOWN LIFTED."
log = "[key_name(user)] lifted AI core lockdown!"
ares_log = "[user.name] lifted AI Core Emergency Lockdown."
ares_log = "Lifted AI Core Emergency Lockdown."
if(admin)
log += " (Admin Triggered)."
ares_log = "[MAIN_AI_SYSTEM] lifted AI Core Emergency Lockdown."
person = MAIN_AI_SYSTEM

if(GLOB.security_level > SEC_LEVEL_GREEN)
set_security_level(SEC_LEVEL_BLUE, TRUE, FALSE)
Expand All @@ -115,4 +116,4 @@
COOLDOWN_START(GLOB.ares_datacore, aicore_lockdown, 2 MINUTES)
shipwide_ai_announcement(message, MAIN_AI_SYSTEM, 'sound/effects/biohazard.ogg')
message_admins(log)
log_ares_security("AI Core Lockdown", ares_log)
log_ares_security("AI Core Lockdown", ares_log, person)
11 changes: 6 additions & 5 deletions code/game/machinery/biohazard_lockdown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ GLOBAL_VAR_INIT(med_lockdown_state, LOCKDOWN_READY)
return PROC_BLOCKED

var/log = "[key_name(user)] triggered research bio lockdown!"
var/ares_log = "[user.name] triggered Medical Research Biohazard Containment Lockdown."
var/ares_log = "Triggered Medical Research Biohazard Containment Lockdown."
var/person = user.name
if(!message)
message = "ATTENTION! \n\nBIOHAZARD CONTAINMENT BREACH. \n\nRESEARCH DEPARTMENT UNDER LOCKDOWN."
else
log = "[key_name(user)] triggered research bio lockdown! (Using a custom announcement)."
if(admin)
log += " (Admin Triggered)."
ares_log = "[MAIN_AI_SYSTEM] triggered Medical Research Biohazard Containment Lockdown."
person = MAIN_AI_SYSTEM

switch(GLOB.med_lockdown_state)
if(LOCKDOWN_READY)
Expand All @@ -93,18 +94,18 @@ GLOBAL_VAR_INIT(med_lockdown_state, LOCKDOWN_READY)
GLOB.med_lockdown_state = LOCKDOWN_READY
message = "ATTENTION! \n\nBIOHAZARD CONTAINMENT LOCKDOWN LIFTED."
log = "[key_name(user)] lifted research bio lockdown!"
ares_log = "[user.name] lifted Medical Research Biohazard Containment Lockdown."
ares_log = "Lifted Medical Research Biohazard Containment Lockdown."
if(admin)
log += " (Admin Triggered)."
ares_log = "[MAIN_AI_SYSTEM] lifted Medical Research Biohazard Containment Lockdown."
person = MAIN_AI_SYSTEM

if(GLOB.security_level > SEC_LEVEL_GREEN)
set_security_level(SEC_LEVEL_BLUE, TRUE, FALSE)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_RESEARCH_LIFT)

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

#undef LOCKDOWN_READY
#undef LOCKDOWN_ACTIVE
Loading
Loading