fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user