Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports keybindings fixes. #32

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -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)
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 @@ -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()

Expand Down
Loading