Skip to content

Commit

Permalink
Admin audio cue toggle. (#5185)
Browse files Browse the repository at this point in the history
# About the pull request
Changes the toggle for ARES interface pings to also include prayers (and
renames it due to this)
Also moved it from logs category to sound, because it's for sounds...
Added SPAN_BIGNOTICE which combines bold & big classes to get rid of
"<b><big></big></b>"

# Explain why it's good for the game

Admin QOL, the sound can be overly intrusive and larger text gets the
point across.

# Testing Photographs and Procedure

<details>
<summary>Screenshots & Videos</summary>

Test to confirm it works as intended.

</details>


# Changelog
:cl:
code: Added a new span class that combines bold and big.
code: Tweaked the way prayer sends notifications to be more efficient.
admin: Moved the prayer notification sound to a toggle preference,
combined with ARES Interface notifications.
/:cl:
  • Loading branch information
realforest2001 committed Dec 26, 2023
1 parent 8da8112 commit 95daff2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
12 changes: 6 additions & 6 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GLOBAL_LIST_INIT(admin_verbs_default, list(
/datum/admins/proc/subtlemessageall,
/datum/admins/proc/alertall,
/datum/admins/proc/imaginary_friend,
/client/proc/toggle_ares_ping,
/client/proc/toggle_admin_pings,
/client/proc/cmd_admin_say, /*staff-only ooc chat*/
/client/proc/cmd_mod_say, /* alternate way of typing asay, no different than cmd_admin_say */
/client/proc/cmd_admin_tacmaps_panel,
Expand Down Expand Up @@ -585,15 +585,15 @@ GLOBAL_LIST_INIT(roundstart_mod_verbs, list(
message_admins("[key_name(usr)] announced a random fact.")
SSticker.mode?.declare_fun_facts()

/client/proc/toggle_ares_ping()
set name = "Toggle ARES notification sound"
set category = "Preferences.Logs"
/client/proc/toggle_admin_pings()
set name = "Toggle StaffIC log sounds"
set category = "Preferences.Sound"

prefs.toggles_sound ^= SOUND_ARES_MESSAGE
if (prefs.toggles_sound & SOUND_ARES_MESSAGE)
to_chat(usr, SPAN_BOLDNOTICE("You will now hear a ping for ARES messages."))
to_chat(usr, SPAN_BOLDNOTICE("You will now hear an audio cue for ARES and Prayer messages."))
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer hear a ping for ARES messages."))
to_chat(usr, SPAN_BOLDNOTICE("You will no longer hear an audio cue for ARES and Prayer messages."))


#undef MAX_WARNS
Expand Down
27 changes: 12 additions & 15 deletions code/modules/admin/verbs/pray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
return

var/liaison = 0
if(job == "Corporate Liaison")
liaison = 1
var/prefix = SPAN_PURPLE("PRAY: ")
var/receipt = "Your prayers have been received by the gods."
if(job == JOB_CORPORATE_LIAISON)
prefix = SPAN_PURPLE("LIAISON: ")
receipt = "Your corporate overlords at Weyland-Yutani have received your message."

if(liaison)
msg = "<b><big>[SPAN_STAFF_IC("<font color=purple>LIAISON:</font>")][key_name(src, 1)] [CC_MARK(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] [ADMIN_JMP_USER(src)] [ADMIN_SC(src)]: [msg]</big></b>"
else
msg = "<b><big>[SPAN_STAFF_IC("<font color=purple>PRAY: </font>")][key_name(src, 1)] [CC_MARK(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] [ADMIN_JMP_USER(src)] [ADMIN_SC(src)]: [msg]</big></b>"
msg = SPAN_BIGNOTICE("[prefix][key_name(src, 1)] [CC_MARK(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] [ADMIN_JMP_USER(src)] [ADMIN_SC(src)]: [msg]")
log_admin(msg)
for(var/client/C in GLOB.admins)
if(AHOLD_IS_MOD(C.admin_holder) && C.prefs.toggles_chat & CHAT_PRAYER)
to_chat(C, msg)
C << 'sound/machines/terminal_alert.ogg'
if(liaison)
to_chat(usr, "Your corporate overlords at Weyland-Yutani have received your message.")
else
to_chat(usr, "Your prayers have been received by the gods.")
for(var/client/admin in GLOB.admins)
if(AHOLD_IS_MOD(admin.admin_holder))
to_chat(admin, SPAN_STAFF_IC(msg))
if(admin.prefs.toggles_sound & SOUND_ARES_MESSAGE)
admin << 'sound/machines/terminal_alert.ogg'
to_chat(usr, receipt)

/proc/high_command_announce(text , mob/Sender , iamessage)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
Expand Down
1 change: 1 addition & 0 deletions code/span_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@
#define SPAN_MAROON(X) "<font color=Maroon>[X]</font>"

#define SPAN_STAFF_IC(X) "<span class='staff_ic'>[X]</span>"
#define SPAN_BIGNOTICE(X) "<span class='bigannounce'>[X]</span>"
4 changes: 2 additions & 2 deletions tgui/packages/tgui-panel/styles/goon/chat-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ em {
font-weight: bold;
}

.minorannounce {
.bigannounce {
font-weight: bold;
font-size: 185%;
font-size: 115%;
}

.greenannounce {
Expand Down
4 changes: 2 additions & 2 deletions tgui/packages/tgui-panel/styles/goon/chat-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ h2.alert {
font-weight: bold;
}

.minorannounce {
.bigannounce {
font-weight: bold;
font-size: 185%;
font-size: 115%;
}

.greenannounce {
Expand Down
4 changes: 2 additions & 2 deletions tgui/public/tgui-panel.bundle.css

Large diffs are not rendered by default.

0 comments on commit 95daff2

Please sign in to comment.