that was weird

This commit is contained in:
SandPoot
2024-09-29 17:11:32 -03:00
parent b0dd5b48ed
commit b65df409d7
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
///loadout stuff
var/gear_points = 10
var/list/gear_categories
var/list/loadout_data[MAXIMUM_LOADOUT_SAVES]
var/list/loadout_data
var/list/unlockable_loadout_data = list()
var/loadout_slot = 1 //goes from 1 to MAXIMUM_LOADOUT_SAVES
var/gear_category
+2 -4
View File
@@ -914,8 +914,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(istext(S["loadout"]))
loadout_data = safe_json_decode(S["loadout"])
else
var/list/make_new[MAXIMUM_LOADOUT_SAVES]
loadout_data = make_new
loadout_data = list()
//let's remember their last used slot, i'm sure "oops i brought the wrong stuff" will be an issue now
S["loadout_slot"] >> loadout_slot
@@ -1286,8 +1285,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(islist(loadout_data))
S["loadout"] << safe_json_encode(loadout_data)
else
var/list/make_new[MAXIMUM_LOADOUT_SAVES]
S["loadout"] << safe_json_encode(make_new)
S["loadout"] << safe_json_encode(list())
WRITE_FILE(S["loadout_slot"], loadout_slot)
if(length(tcg_cards))