From 3bd415c0f4267f3879a7711c6fcdc7374c7c28e2 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sat, 20 Jul 2024 15:23:28 +0300 Subject: [PATCH] hmm --- code/modules/client/preferences.dm | 1 + code/modules/client/preferences_savefile.dm | 3 +++ code/modules/client/preferences_ui.dm | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 03272e82691..a80ab196326 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -246,6 +246,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) random_character() menuoptions = list() key_bindings = deepCopyList(GLOB.hotkey_keybinding_list_by_key) // give them default keybinds and update their movement keys + save_keybinds() for(var/i in 1 to CUSTOM_EMOTE_SLOTS) var/datum/custom_emote/emote = new emote.id = i diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 6475e512597..a7a153c66ed 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -225,6 +225,9 @@ volume_tts = sanitize_integer(volume_tts, 1, 100, initial(volume_tts)) key_bindings = sanitize_islist(key_bindings, list()) + if(!length(key_bindings)) + key_bindings = deepCopyList(GLOB.hotkey_keybinding_list_by_key) + custom_emotes = sanitize_is_full_emote_list(custom_emotes) chem_macros = sanitize_islist(chem_macros, list()) quick_equip = sanitize_islist(quick_equip, QUICK_EQUIP_ORDER, MAX_QUICK_EQUIP_SLOTS, TRUE, VALID_EQUIP_SLOTS) diff --git a/code/modules/client/preferences_ui.dm b/code/modules/client/preferences_ui.dm index e23464c70cd..62f336aa885 100644 --- a/code/modules/client/preferences_ui.dm +++ b/code/modules/client/preferences_ui.dm @@ -927,7 +927,7 @@ emote.spoken_emote = !emote.spoken_emote if("reset-keybindings") - key_bindings = GLOB.hotkey_keybinding_list_by_key + key_bindings = deepCopyList(GLOB.hotkey_keybinding_list_by_key) current_client.set_macros() save_keybinds()