more fixes

This commit is contained in:
Timothy Teakettle
2020-12-06 22:14:35 +00:00
parent 53a434cfb1
commit e413fcb091
3 changed files with 10 additions and 2 deletions

View File

@@ -2927,7 +2927,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/datum/preferences/proc/remove_gear_from_loadout(save_slot, gear_type)
var/find_gear = has_loadout_gear(save_slot, gear_type)
if(find_gear)
loadout_data["SAVE_[save_slot]"] -= find_gear
loadout_data["SAVE_[save_slot]"] -= list(find_gear)
#undef DEFAULT_SLOT_AMT
#undef HANDS_SLOT_AMT

View File

@@ -274,8 +274,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(!ispath(text2path(some_gear_item)))
message_admins("Failed to copy item [some_gear_item] to new loadout system when migrating from version [current_version] to 40, issue: item is not a path")
continue
loadout_data["SAVE_1"] += list(list(LOADOUT_ITEM = some_gear_item)) //for the migration we put their old save into the first save slot, which is loaded by default!
var/datum/gear/gear_item = text2path(some_gear_item)
if(!initial(gear_item.loadout_initial_colors))
loadout_data["SAVE_1"] += list(list(LOADOUT_ITEM = some_gear_item)) //for the migration we put their old save into the first save slot, which is loaded by default!
else
//the same but we setup some new polychromic data
loadout_data["SAVE_1"] += list(list(LOADOUT_ITEM = some_gear_item, LOADOUT_COLOR = initial(gear_item.loadout_initial_colors)))
//it's double packed into a list because += will union the two lists contents
S["loadout"] = safe_json_encode(loadout_data)
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")

View File

@@ -47,6 +47,8 @@
/datum/gear/uniform/maidcostume/polychromic
name = "Polychromic maid costume"
path = /obj/item/clothing/under/rank/civilian/janitor/maid/polychromic
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
loadout_initial_colors = list("#FFFFFF", "#000000")
/datum/gear/uniform/mailmanuniform
name = "Mailman's jumpsuit"