[MANUAL MIRROR] Admin alert for communications console messages (#18529)

Admin alert for communications console messages (#72412)

Adds an audio alert when a CentCom or Syndicate communications console
message is sent, for things such as ERT requests.

It is optional and can be toggled in the Game Preferences menu.

Also fixes an incorrect line in the prefs readme.md

Less missing CentCom messages because you're busy doing other things,
less complaining that you're ignoring them.
This commit is contained in:
lessthanthree
2023-01-06 08:50:39 -08:00
committed by GitHub
parent 144b40c0df
commit 3d0718f516
5 changed files with 29 additions and 1 deletions
+8
View File
@@ -55,6 +55,9 @@
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
GLOB.requests.message_centcom(sender.client, msg)
msg = span_adminnotice("<b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)]:</b> [msg]")
for(var/client/staff as anything in GLOB.admins)
if(staff?.prefs.read_preference(/datum/preference/toggle/comms_notification))
SEND_SOUND(staff, sound('sound/misc/announce_dig.ogg'))
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.shuttle_caller_list)
console.override_cooldown()
@@ -64,6 +67,9 @@
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
GLOB.requests.message_syndicate(sender.client, msg)
msg = span_adminnotice("<b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_SYNDICATE_REPLY(sender)]:</b> [msg]")
for(var/client/staff as anything in GLOB.admins)
if(staff?.prefs.read_preference(/datum/preference/toggle/comms_notification))
SEND_SOUND(staff, sound('sound/misc/announce_dig.ogg'))
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.shuttle_caller_list)
console.override_cooldown()
@@ -73,6 +79,8 @@
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
GLOB.requests.nuke_request(sender.client, msg)
msg = span_adminnotice("<b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)] [ADMIN_SET_SD_CODE]:</b> [msg]")
for(var/client/staff as anything in GLOB.admins)
SEND_SOUND(staff, sound('sound/misc/announce_dig.ogg'))
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.shuttle_caller_list)
console.override_cooldown()