From c141754476551c74149b828603bf2efab7a02eed Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:16:09 +0100 Subject: [PATCH] [MIRROR] Adds a seperate chat category for prayers [MDB IGNORE] (#18434) * Separate chat category for prayers (#72274) ## About The Pull Request Smithers asked me to, and he's pretty cool. Said something about being hard to notice prayers and wanting to be able to make a unique pane for them. This doesn't include subtle messages, tho they're dumped into admin log so it wouldn't be that hard to stick them in the same subcategory. lemme know if that's an issue :cl: admin: Added a new chat category for prayers. Filter them out, move them to their own pane, live your best life /:cl: * Adds a seperate chat category for prayers Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/__DEFINES/chat.dm | 1 + code/modules/admin/verbs/pray.dm | 2 +- tgui/packages/tgui-panel/chat/constants.js | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/chat.dm b/code/__DEFINES/chat.dm index 910e999d61d..d4585227ea2 100644 --- a/code/__DEFINES/chat.dm +++ b/code/__DEFINES/chat.dm @@ -13,6 +13,7 @@ #define MESSAGE_TYPE_ADMINPM "adminpm" #define MESSAGE_TYPE_COMBAT "combat" #define MESSAGE_TYPE_ADMINCHAT "adminchat" +#define MESSAGE_TYPE_PRAYER "prayer" #define MESSAGE_TYPE_MODCHAT "modchat" #define MESSAGE_TYPE_EVENTCHAT "eventchat" #define MESSAGE_TYPE_ADMINLOG "adminlog" diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index b4badbc50c2..2665d2215eb 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -44,7 +44,7 @@ msg = span_adminnotice("[icon2html(cross, GLOB.admins)][prayer_type][deity ? " (to [deity])" : ""]: [ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]: [span_linkify(msg)]") for(var/client/C in GLOB.admins) if(C.prefs.chat_toggles & CHAT_PRAYER) - to_chat(C, msg, confidential = TRUE) + to_chat(C, msg, type = MESSAGE_TYPE_PRAYER, confidential = TRUE) to_chat(usr, span_info("You pray to the gods: \"[msg_tmp]\""), confidential = TRUE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/tgui/packages/tgui-panel/chat/constants.js b/tgui/packages/tgui-panel/chat/constants.js index bf7e8e1d439..88c81d86d85 100644 --- a/tgui/packages/tgui-panel/chat/constants.js +++ b/tgui/packages/tgui-panel/chat/constants.js @@ -32,6 +32,7 @@ export const MESSAGE_TYPE_ADMINPM = 'adminpm'; export const MESSAGE_TYPE_COMBAT = 'combat'; export const MESSAGE_TYPE_ADMINCHAT = 'adminchat'; export const MESSAGE_TYPE_MODCHAT = 'modchat'; +export const MESSAGE_TYPE_PRAYER = 'prayer'; export const MESSAGE_TYPE_EVENTCHAT = 'eventchat'; export const MESSAGE_TYPE_ADMINLOG = 'adminlog'; export const MESSAGE_TYPE_ATTACKLOG = 'attacklog'; @@ -120,6 +121,12 @@ export const MESSAGE_TYPES = [ selector: '.mod_channel', admin: true, }, + { + type: MESSAGE_TYPE_PRAYER, + name: 'Prayers', + description: 'Prayers from players', + admin: true, + }, { type: MESSAGE_TYPE_ADMINLOG, name: 'Admin Log',