From 1c2dbf9036394523cdc762516e3faa111a4ba843 Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Tue, 24 Jan 2023 07:17:07 -0500 Subject: [PATCH] Fixes guest accounts not having keybinds and getting constant runtimes (#72818) ## About The Pull Request When loading values from the savefile for keybinds, it overrode the default values with null if not found. ## Why It's Good For The Game Resolves https://github.com/tgstation/tgstation/issues/72804 ## Changelog --- code/modules/client/preferences_savefile.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index b402d8e3fd2015..03047b9a7c8849 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -168,19 +168,19 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car apply_all_client_preferences() //general preferences - lastchangelog = savefile.get_entry("lastchangelog") - be_special = savefile.get_entry("be_special") - default_slot = savefile.get_entry("default_slot") - chat_toggles = savefile.get_entry("chat_toggles") - toggles = savefile.get_entry("toggles") - ignoring = savefile.get_entry("ignoring") + lastchangelog = savefile.get_entry("lastchangelog", lastchangelog) + be_special = savefile.get_entry("be_special", be_special) + default_slot = savefile.get_entry("default_slot", default_slot) + chat_toggles = savefile.get_entry("chat_toggles", chat_toggles) + toggles = savefile.get_entry("toggles", toggles) + ignoring = savefile.get_entry("ignoring", ignoring) // OOC commendations - hearted_until = savefile.get_entry("hearted_until") + hearted_until = savefile.get_entry("hearted_until", hearted_until) if(hearted_until > world.realtime) hearted = TRUE //favorite outfits - favorite_outfits = savefile.get_entry("favorite_outfits") + favorite_outfits = savefile.get_entry("favorite_outfits", favorite_outfits) var/list/parsed_favs = list() for(var/typetext in favorite_outfits) @@ -190,7 +190,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car favorite_outfits = unique_list(parsed_favs) // Custom hotkeys - key_bindings = savefile.get_entry("key_bindings") + key_bindings = savefile.get_entry("key_bindings", key_bindings) //try to fix any outdated data if necessary if(needs_update >= 0)