From 898221e5abeb7bf879b8c932007a88be031b2b92 Mon Sep 17 00:00:00 2001 From: scriptis Date: Sun, 12 Feb 2023 14:32:44 -0600 Subject: [PATCH] Update tgui say keybindings when keybindings are updated (#73257) Updating or resetting your preferences doesn't actually currently update the movement/tgui say keybindings. This fixes that, although there's still a weird heisenbug with NULL keybindings that we haven't been able to reproduce at all from #73247 --- code/modules/client/preferences/middleware/keybindings.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preferences/middleware/keybindings.dm b/code/modules/client/preferences/middleware/keybindings.dm index f4a1c06784e..07ec54d3cbc 100644 --- a/code/modules/client/preferences/middleware/keybindings.dm +++ b/code/modules/client/preferences/middleware/keybindings.dm @@ -27,6 +27,7 @@ preferences.key_bindings = deep_copy_list(GLOB.default_hotkeys) preferences.key_bindings_by_key = preferences.get_key_bindings_by_key(preferences.key_bindings) preferences.update_static_data(user) + user.client.update_special_keybinds() return TRUE @@ -41,10 +42,11 @@ preferences.key_bindings_by_key = preferences.get_key_bindings_by_key(preferences.key_bindings) preferences.update_static_data(user) + user.client.update_special_keybinds() return TRUE -/datum/preference_middleware/keybindings/proc/set_keybindings(list/params) +/datum/preference_middleware/keybindings/proc/set_keybindings(list/params, mob/user) var/keybind_name = params["keybind_name"] if (isnull(GLOB.keybindings_by_name[keybind_name])) @@ -73,6 +75,8 @@ preferences.key_bindings[keybind_name] = hotkeys preferences.key_bindings_by_key = preferences.get_key_bindings_by_key(preferences.key_bindings) + user.client.update_special_keybinds() + return TRUE /datum/asset/json/keybindings