This commit is contained in:
Timothy Teakettle
2021-01-01 22:39:16 +00:00
parent 974f46cb22
commit dc44102d8b
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -1033,7 +1033,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(!length(unlockable_loadout_data))
unlockable_loadout_data = list()
unlockable_loadout_data[key] = amount
WRITE_FILE(S["unlockable_loadout"], unlockable_loadout_data)
WRITE_FILE(S["unlockable_loadout"], safe_json_encode(unlockable_loadout_data))
prefs.unlockable_loadout_data = unlockable_loadout_data
return TRUE
else
@@ -1041,7 +1041,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
unlockable_loadout_data[key] += amount
else
unlockable_loadout_data[key] = amount
WRITE_FILE(S["unlockable_loadout"], unlockable_loadout_data)
WRITE_FILE(S["unlockable_loadout"], safe_json_encode(unlockable_loadout_data))
prefs.unlockable_loadout_data = unlockable_loadout_data
return TRUE
return FALSE
+4 -1
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 47
#define SAVEFILE_VERSION_MAX 48
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -285,6 +285,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["loadout"] = safe_json_encode(loadout_data)
if(current_version < 48) //unlockable loadout items but we need to clear bad data from a mistake
S["unlockable_loadout"] = list()
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
return