Skip to content

Commit

Permalink
Keybinds misc fixes (tgstation#15975)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStonedOne authored Jun 2, 2024
1 parent f439030 commit 3d60532
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,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
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences_ui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,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()

Expand Down

0 comments on commit 3d60532

Please sign in to comment.