Skip to content

Commit

Permalink
Fixes guest accounts not having keybinds and getting constant runtimes (
Browse files Browse the repository at this point in the history
tgstation#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 tgstation#72804
## Changelog
  • Loading branch information
ZephyrTFA committed Jan 24, 2023
1 parent 8c9970e commit 1c2dbf9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 1c2dbf9

Please sign in to comment.