From 5de801ac40b396add616673547ab91cfdd4441da Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 22 Nov 2020 21:08:58 +0000 Subject: [PATCH] communication hotkeys --- code/modules/client/preferences_savefile.dm | 10 +++++++++ .../keybindings/keybind/communication.dm | 22 +++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 64e49fea8d..7989e818f5 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -226,6 +226,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car left_eye_color = "#BAB99E" right_eye_color = "#BAB99E" + if(current_version < 5000) + var/ctrl_t_binding = S["key_bindings"]["CtrlT"] + var/ctrl_m_binding = S["key_bindings"]["CtrlM"] + if(length(ctrl_t_binding) && "say_with_indicator" in ctrl_t_binding) + S["key_bindings"]["T"] = "say_with_indicator" + S["key_bindings"]["CtrlT"] = "say" + if(length(ctrl_m_binding) && "me_with_indicator" in ctrl_m_binding) + S["key_bindings"]["M"] = "me_with_indicator" + S["key_bindings"]["CtrlM"] = "me" + /datum/preferences/proc/load_path(ckey,filename="preferences.sav") if(!ckey) return diff --git a/code/modules/keybindings/keybind/communication.dm b/code/modules/keybindings/keybind/communication.dm index d93125710e..f3a7028c58 100644 --- a/code/modules/keybindings/keybind/communication.dm +++ b/code/modules/keybindings/keybind/communication.dm @@ -2,8 +2,8 @@ category = CATEGORY_COMMUNICATION /datum/keybinding/client/communication/say - hotkey_keys = list("T") - name = "Say" + hotkey_keys = list("CtrlT") + name = "say" full_name = "IC Say" /datum/keybinding/client/communication/say/down(client/user) @@ -22,9 +22,9 @@ return TRUE /datum/keybinding/client/communication/me - hotkey_keys = list("M") - name = "Me" - full_name = "Custom Emote (/Me)" + hotkey_keys = list("CtrlM") + name = "me" + full_name = "Me (emote)" /datum/keybinding/client/communication/me/down(client/user) var/mob/M = user.mob @@ -33,24 +33,24 @@ return TRUE //indicators -/datum/keybinding/mob/say_with_indicator - hotkey_keys = list("CtrlT") +/datum/keybinding/client/communication/say_with_indicator + hotkey_keys = list("T") classic_keys = list() name = "say_with_indicator" full_name = "Say with Typing Indicator" -/datum/keybinding/mob/say_with_indicator/down(client/user) +/datum/keybinding/client/communication/say_with_indicator/down(client/user) var/mob/M = user.mob M.say_typing_indicator() return TRUE -/datum/keybinding/mob/me_with_indicator - hotkey_keys = list("CtrlM") +/datum/keybinding/client/communication/me_with_indicator + hotkey_keys = list("M") classic_keys = list() name = "me_with_indicator" full_name = "Me (emote) with Typing Indicator" -/datum/keybinding/mob/me_with_indicator/down(client/user) +/datum/keybinding/client/communication/me_with_indicator/down(client/user) var/mob/M = user.mob M.me_typing_indicator() return TRUE \ No newline at end of file