Skip to content

Commit

Permalink
Project ARES: Hijack logging (#4471)
Browse files Browse the repository at this point in the history
# About the pull request
Fixes a missing log for Queen dropship summon, and also adds security
logs for xenos on a dropship.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
Consistency!
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: Added missing flight record for Queen dropship summon.
code: Added security record option for shipwide_ai_announcement.
add: Added security records for unidentified lifeforms announcement.
/:cl:
  • Loading branch information
realforest2001 committed Oct 9, 2023
1 parent e03c820 commit cfafcd9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
10 changes: 7 additions & 3 deletions code/defines/procs/announcement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

//AI shipside announcement, that uses announcement mechanic instead of talking into comms
//to ensure that all humans on ship hear it regardless of comms and power
/proc/shipwide_ai_announcement(message, title = MAIN_AI_SYSTEM, sound_to_play = sound('sound/misc/interference.ogg'), signature)
/proc/shipwide_ai_announcement(message, title = MAIN_AI_SYSTEM, sound_to_play = sound('sound/misc/interference.ogg'), signature, ares_logging = ARES_LOG_MAIN)
var/list/targets = GLOB.human_mob_list + GLOB.dead_mob_list
for(var/mob/T in targets)
if(isobserver(T))
Expand All @@ -136,8 +136,12 @@
if(!isnull(signature))
message += "<br><br><i> Signed by, <br> [signature]</i>"
var/datum/ares_link/link = GLOB.ares_link
if(link.interface && !(link.interface.inoperable()))
link.log_ares_announcement(title, message)
if(ares_can_log())
switch(ares_logging)
if(ARES_LOG_MAIN)
link.log_ares_announcement(title, message)
if(ARES_LOG_SECURITY)
link.log_ares_security(title, message)

announcement_helper(message, title, targets, sound_to_play)

Expand Down
3 changes: 3 additions & 0 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@
return
to_chat(xeno, SPAN_NOTICE("You command the metal bird to come down. Clever girl."))
xeno_announcement(SPAN_XENOANNOUNCE("Your Queen has commanded the metal bird to the hive at [linked_lz]."), xeno.hivenumber, XENO_GENERAL_ANNOUNCE)
var/datum/ares_link/link = GLOB.ares_link
link.log_ares_flight("Unknown", "Remote launch signal for [shuttle.name] received. Authentication garbled.")
link.log_ares_security("Security Alert", "Remote launch signal for [shuttle.name] received. Authentication garbled.")
return
if(shuttle.destination.id != linked_lz)
to_chat(xeno, "The shuttle not ready. The screen reads T-[shuttle.timeLeft(10)]. Have patience.")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/shuttle/shuttles/dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

var/name = "Unidentified Lifesigns"
var/input = "Unidentified lifesigns detected onboard. Recommendation: lockdown of exterior access ports, including ducting and ventilation."
shipwide_ai_announcement(input, name, 'sound/AI/unidentified_lifesigns.ogg')
shipwide_ai_announcement(input, name, 'sound/AI/unidentified_lifesigns.ogg', ares_logging = ARES_LOG_SECURITY)
set_security_level(SEC_LEVEL_RED)
return

Expand Down
2 changes: 1 addition & 1 deletion code/modules/shuttles/marine_ferry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
if(X && X.stat != DEAD)
var/name = "Unidentified Lifesigns"
var/input = "Unidentified lifesigns detected onboard. Recommendation: lockdown of exterior access ports, including ducting and ventilation."
shipwide_ai_announcement(input, name, 'sound/AI/unidentified_lifesigns.ogg')
shipwide_ai_announcement(input, name, 'sound/AI/unidentified_lifesigns.ogg', ares_logging = ARES_LOG_SECURITY)
set_security_level(SEC_LEVEL_RED)
break

Expand Down

0 comments on commit cfafcd9

Please sign in to comment.