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

Admin audio cue toggle. #5185

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
fira marked this conversation as resolved.
Show resolved Hide resolved
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.

Loading