diff --git a/code/__DEFINES/speech_channels.dm b/code/__DEFINES/speech_channels.dm index 1be25c62ac8..9f1526ebd56 100644 --- a/code/__DEFINES/speech_channels.dm +++ b/code/__DEFINES/speech_channels.dm @@ -3,3 +3,4 @@ #define RADIO_CHANNEL "Radio" #define ME_CHANNEL "Me" #define OOC_CHANNEL "OOC" +#define ADMIN_CHANNEL "Admin" diff --git a/code/datums/keybinding/admin.dm b/code/datums/keybinding/admin.dm index 39fa27f40c3..80936aa41e7 100644 --- a/code/datums/keybinding/admin.dm +++ b/code/datums/keybinding/admin.dm @@ -7,18 +7,11 @@ /datum/keybinding/admin/admin_say hotkey_keys = list("F3") - name = "admin_say" + name = ADMIN_CHANNEL full_name = "Admin say" description = "Talk with other admins." keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN -/datum/keybinding/admin/admin_say/down(client/user) - . = ..() - if(.) - return - user.get_admin_say() - return TRUE - /datum/keybinding/admin/admin_ghost hotkey_keys = list("F5") name = "admin_ghost" diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 476f4ac3117..bbdb6bfbe22 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -114,6 +114,7 @@ GLOBAL_PROTECT(href_token) disassociate() add_verb(client, /client/proc/readmin) client.disable_combo_hud() + client.update_special_keybinds() /datum/admins/proc/associate(client/client) if(IsAdminAdvancedProcCall()) @@ -154,6 +155,7 @@ GLOBAL_PROTECT(href_token) owner.add_admin_verbs() remove_verb(owner, /client/proc/readmin) owner.init_verbs() //re-initialize the verb list + owner.update_special_keybinds() GLOB.admins |= client try_give_profiling() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index c86215547c3..560e9b52d4c 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -1046,7 +1046,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( * * Handles adding macros for the keys that need it * And adding movement keys to the clients movement_keys list - * At the time of writing this, communication(OOC, Say, IC) require macros + * At the time of writing this, communication(OOC, Say, IC, ASAY) require macros * Arguments: * * direct_prefs - the preference we're going to get keybinds from */ @@ -1078,6 +1078,12 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(OOC_CHANNEL) var/ooc = tgui_say_create_open_command(OOC_CHANNEL) winset(src, "default-[REF(key)]", "parent=default;name=[key];command=[ooc]") + if(ADMIN_CHANNEL) + if(holder) + var/asay = tgui_say_create_open_command(ADMIN_CHANNEL) + winset(src, "default-[REF(key)]", "parent=default;name=[key];command=[asay]") + else + winset(src, "default-[REF(key)]", "parent=default;name=[key];command=") /client/proc/change_view(new_size) if (isnull(new_size)) diff --git a/code/modules/tgui_input/say_modal/modal.dm b/code/modules/tgui_input/say_modal/modal.dm index 020af14cea7..4acb4069ed0 100644 --- a/code/modules/tgui_input/say_modal/modal.dm +++ b/code/modules/tgui_input/say_modal/modal.dm @@ -82,7 +82,7 @@ if(!payload?["channel"]) CRASH("No channel provided to an open TGUI-Say") window_open = TRUE - if(payload["channel"] != OOC_CHANNEL) + if(payload["channel"] != OOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL) start_thinking() if(client.typing_indicators) log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators enabled.") diff --git a/code/modules/tgui_input/say_modal/speech.dm b/code/modules/tgui_input/say_modal/speech.dm index eff380b5d59..27e5776b3f1 100644 --- a/code/modules/tgui_input/say_modal/speech.dm +++ b/code/modules/tgui_input/say_modal/speech.dm @@ -44,6 +44,9 @@ if(OOC_CHANNEL) client.ooc(entry) return TRUE + if(ADMIN_CHANNEL) + client.cmd_admin_say(entry) + return TRUE return FALSE /** diff --git a/tgui/packages/tgui-say/constants/index.tsx b/tgui/packages/tgui-say/constants/index.tsx index 09158ad5022..85c83384d10 100644 --- a/tgui/packages/tgui-say/constants/index.tsx +++ b/tgui/packages/tgui-say/constants/index.tsx @@ -1,5 +1,5 @@ /** Radio channels */ -export const CHANNELS = ['Say', 'Radio', 'Me', 'OOC'] as const; +export const CHANNELS = ['Say', 'Radio', 'Me', 'OOC', 'Admin'] as const; /** Window sizes in pixels */ export enum WINDOW_SIZES { diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss index 728eede8236..24eb8aae186 100644 --- a/tgui/packages/tgui-say/styles/colors.scss +++ b/tgui/packages/tgui-say/styles/colors.scss @@ -17,6 +17,7 @@ $ooc: #cca300; //////////////////////////////////////////////// // Subchannel chat colors $ai: #d65d95; +$admin: #ffbbff; $binary: #1e90ff; $centcom: #2681a5; $command: #fcdf03; @@ -35,6 +36,7 @@ $_channel_map: ( 'me': $me, 'ooc': $ooc, 'ai': $ai, + 'admin': $admin, 'binary': $binary, 'centcom': $centcom, 'command': $command,