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
This commit is contained in:
Zephyr
2023-01-24 07:17:07 -05:00
committed by GitHub
parent 8c9970e1e8
commit 1c2dbf9036
+9 -9
View File
@@ -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)