From 50fd36efa59d2c58579f86fbab455f8e8c5b3959 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Mon, 28 Dec 2020 17:04:48 +0000 Subject: [PATCH] oops! all runtime! --- code/modules/client/preferences_savefile.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4d2af47d90..049a374d8e 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -736,9 +736,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car belly_prefs = json_from_file["belly_prefs"] //gear loadout - loadout_data = safe_json_decode(S["loadout"]) + if(S["loadout"]) + loadout_data = safe_json_decode(S["loadout"]) + else + loadout_data = list() - unlockable_loadout_data = safe_json_decode(S["unlockable_loadout"]) + if(S["unlockable_loadout"]) + unlockable_loadout_data = safe_json_decode(S["unlockable_loadout"]) + else + unlockable_loadout_data = list() //try to fix any outdated data if necessary //preference updating will handle saving the updated data for us.