test
This commit is contained in:
@@ -2471,7 +2471,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(index && marking_type && features[marking_type])
|
||||
// work out the input options to show the user
|
||||
var/list/options = list("Primary")
|
||||
var/number_colors = href_list["number_colors"]
|
||||
var/number_colors = text2num(href_list["number_colors"])
|
||||
var/color_number = 1 // 1-3 which color are we editing
|
||||
if(number_colors >= 2)
|
||||
options += "Secondary"
|
||||
|
||||
@@ -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 50
|
||||
#define SAVEFILE_VERSION_MAX 51
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -295,6 +295,27 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
L -= ROLE_SYNDICATE
|
||||
S["be_special"] << L
|
||||
|
||||
if(current_version < 51) // rp markings means markings are now stored as a list
|
||||
var/marking_type
|
||||
var/species_id = S["species"]
|
||||
var/datum/species/actual_species = GLOB.species_datums[species_id]
|
||||
if(actual_species.mutant_bodyparts["body_markings"] && S["feature_lizard_body_markings"]) marking_type = "feature_lizard_body_markings"
|
||||
if(actual_species.mutant_bodyparts["mam_body_markings"] && S["feature_mam_body_markings"]) marking_type = "feature_mam_body_markings"
|
||||
|
||||
if(marking_type)
|
||||
var/old_marking_value = S[marking_type]
|
||||
var/list/color_list = list("#FFFFFF","#FFFFFF","#FFFFFF")
|
||||
|
||||
if(S["feature_mcolor"]) color_list[1] = S["feature_mcolor"]
|
||||
if(S["feature_mcolor2"]) color_list[2] = S["feature_mcolor2"]
|
||||
if(S["feature_mcolor3"]) color_list[3] = S["feature_mcolor3"]
|
||||
|
||||
var/marking_list = list()
|
||||
for(var/part in list(ARM_LEFT, ARM_RIGHT, LEG_LEFT, LEG_RIGHT, CHEST, HEAD))
|
||||
marking_list += list(list(part, old_marking_value, color_list.Copy()))
|
||||
|
||||
S[marking_type] = safe_json_encode(marking_list)
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
return
|
||||
@@ -638,7 +659,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_lizard_horns"] >> features["horns"]
|
||||
S["feature_lizard_frills"] >> features["frills"]
|
||||
S["feature_lizard_spines"] >> features["spines"]
|
||||
S["feature_lizard_body_markings"] >> features["body_markings"]
|
||||
features["body_markings"] = safe_json_decode(S["feature_lizard_body_markings"])
|
||||
S["feature_lizard_legs"] >> features["legs"]
|
||||
S["feature_human_tail"] >> features["tail_human"]
|
||||
S["feature_human_ears"] >> features["ears"]
|
||||
@@ -707,7 +728,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_genitals_use_skintone"] >> features["genitals_use_skintone"]
|
||||
S["feature_mcolor2"] >> features["mcolor2"]
|
||||
S["feature_mcolor3"] >> features["mcolor3"]
|
||||
S["feature_mam_body_markings"] >> features["mam_body_markings"]
|
||||
features["mam_body_markings"] = safe_json_decode(S["feature_mam_body_markings"])
|
||||
S["feature_mam_tail"] >> features["mam_tail"]
|
||||
S["feature_mam_ears"] >> features["mam_ears"]
|
||||
S["feature_mam_tail_animated"] >> features["mam_tail_animated"]
|
||||
@@ -837,7 +858,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["ears"] = sanitize_inlist(features["ears"], GLOB.ears_list)
|
||||
features["frills"] = sanitize_inlist(features["frills"], GLOB.frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], GLOB.spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
|
||||
features["legs"] = sanitize_inlist(features["legs"], GLOB.legs_list, "Plantigrade")
|
||||
features["deco_wings"] = sanitize_inlist(features["deco_wings"], GLOB.deco_wings_list, "None")
|
||||
features["insect_fluff"] = sanitize_inlist(features["insect_fluff"], GLOB.insect_fluffs_list)
|
||||
@@ -1006,7 +1026,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["feature_human_ears"] , features["ears"])
|
||||
WRITE_FILE(S["feature_lizard_frills"] , features["frills"])
|
||||
WRITE_FILE(S["feature_lizard_spines"] , features["spines"])
|
||||
WRITE_FILE(S["feature_lizard_body_markings"] , features["body_markings"])
|
||||
WRITE_FILE(S["feature_lizard_body_markings"] , safe_json_encode(features["body_markings"]))
|
||||
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
|
||||
WRITE_FILE(S["feature_deco_wings"] , features["deco_wings"])
|
||||
WRITE_FILE(S["feature_horns_color"] , features["horns_color"])
|
||||
|
||||
Reference in New Issue
Block a user