Merge branch 'master' into communication-hotkeys
This commit is contained in:
@@ -7,4 +7,4 @@ GLOBAL_LIST_EMPTY(clientmessages)
|
||||
var/list/L = GLOB.clientmessages[ckey]
|
||||
if(!L)
|
||||
GLOB.clientmessages[ckey] = L = list()
|
||||
L += message
|
||||
L += message
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
var/list/logging = list()
|
||||
var/list/post_login_callbacks = list()
|
||||
var/list/post_logout_callbacks = list()
|
||||
var/byond_version = "Unknown"
|
||||
var/byond_version = "Unknown"
|
||||
|
||||
@@ -101,73 +101,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/eye_type = DEFAULT_EYES_TYPE //Eye type
|
||||
var/split_eye_colors = FALSE
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFFFFF",
|
||||
"mcolor2" = "FFFFFF",
|
||||
"mcolor3" = "FFFFFF",
|
||||
"tail_lizard" = "Smooth",
|
||||
"tail_human" = "None",
|
||||
"snout" = "Round",
|
||||
"horns" = "None",
|
||||
"horns_color" = "85615a",
|
||||
"ears" = "None",
|
||||
"wings" = "None",
|
||||
"wings_color" = "FFF",
|
||||
"frills" = "None",
|
||||
"deco_wings" = "None",
|
||||
"spines" = "None",
|
||||
"body_markings" = "None",
|
||||
"legs" = "Plantigrade",
|
||||
"insect_wings" = "Plain",
|
||||
"insect_fluff" = "None",
|
||||
"insect_markings" = "None",
|
||||
"arachnid_legs" = "Plain",
|
||||
"arachnid_spinneret" = "Plain",
|
||||
"arachnid_mandibles" = "Plain",
|
||||
"mam_body_markings" = "Plain",
|
||||
"mam_ears" = "None",
|
||||
"mam_snouts" = "None",
|
||||
"mam_tail" = "None",
|
||||
"mam_tail_animated" = "None",
|
||||
"xenodorsal" = "Standard",
|
||||
"xenohead" = "Standard",
|
||||
"xenotail" = "Xenomorph Tail",
|
||||
"taur" = "None",
|
||||
"genitals_use_skintone" = FALSE,
|
||||
"has_cock" = FALSE,
|
||||
"cock_shape" = DEF_COCK_SHAPE,
|
||||
"cock_length" = COCK_SIZE_DEF,
|
||||
"cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF,
|
||||
"cock_color" = "ffffff",
|
||||
"cock_taur" = FALSE,
|
||||
"has_balls" = FALSE,
|
||||
"balls_color" = "ffffff",
|
||||
"balls_shape" = DEF_BALLS_SHAPE,
|
||||
"balls_size" = BALLS_SIZE_DEF,
|
||||
"balls_cum_rate" = CUM_RATE,
|
||||
"balls_cum_mult" = CUM_RATE_MULT,
|
||||
"balls_efficiency" = CUM_EFFICIENCY,
|
||||
"has_breasts" = FALSE,
|
||||
"breasts_color" = "ffffff",
|
||||
"breasts_size" = BREASTS_SIZE_DEF,
|
||||
"breasts_shape" = DEF_BREASTS_SHAPE,
|
||||
"breasts_producing" = FALSE,
|
||||
"has_vag" = FALSE,
|
||||
"vag_shape" = DEF_VAGINA_SHAPE,
|
||||
"vag_color" = "ffffff",
|
||||
"has_womb" = FALSE,
|
||||
"balls_visibility" = GEN_VISIBLE_NO_UNDIES,
|
||||
"breasts_visibility"= GEN_VISIBLE_NO_UNDIES,
|
||||
"cock_visibility" = GEN_VISIBLE_NO_UNDIES,
|
||||
"vag_visibility" = GEN_VISIBLE_NO_UNDIES,
|
||||
"ipc_screen" = "Sunburst",
|
||||
"ipc_antenna" = "None",
|
||||
"flavor_text" = "",
|
||||
"silicon_flavor_text" = "",
|
||||
"ooc_notes" = "",
|
||||
"meat_type" = "Mammalian",
|
||||
"body_model" = MALE,
|
||||
"body_size" = RESIZE_DEFAULT_SIZE
|
||||
)
|
||||
var/list/features = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF", "mcolor3" = "FFFFFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "horns_color" = "85615a", "ears" = "None", "wings" = "None", "wings_color" = "FFF", "frills" = "None", "deco_wings" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Plantigrade", "insect_wings" = "Plain", "insect_fluff" = "None", "insect_markings" = "None", "arachnid_legs" = "Plain", "arachnid_spinneret" = "Plain", "arachnid_mandibles" = "Plain", "mam_body_markings" = "Plain", "mam_ears" = "None", "mam_snouts" = "None", "mam_tail" = "None", "mam_tail_animated" = "None", "xenodorsal" = "Standard", "xenohead" = "Standard", "xenotail" = "Xenomorph Tail", "taur" = "None", "genitals_use_skintone" = FALSE, "has_cock" = FALSE, "cock_shape" = DEF_COCK_SHAPE, "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "ffffff", "cock_taur" = FALSE, "has_balls" = FALSE, "balls_color" = "ffffff", "balls_shape" = DEF_BALLS_SHAPE, "balls_size" = BALLS_SIZE_DEF, "balls_cum_rate" = CUM_RATE, "balls_cum_mult" = CUM_RATE_MULT, "balls_efficiency" = CUM_EFFICIENCY, "has_breasts" = FALSE, "breasts_color" = "ffffff", "breasts_size" = BREASTS_SIZE_DEF, "breasts_shape" = DEF_BREASTS_SHAPE, "breasts_producing" = FALSE, "has_vag" = FALSE, "vag_shape" = DEF_VAGINA_SHAPE, "vag_color" = "ffffff", "has_womb" = FALSE, "balls_visibility" = GEN_VISIBLE_NO_UNDIES, "breasts_visibility"= GEN_VISIBLE_NO_UNDIES, "cock_visibility" = GEN_VISIBLE_NO_UNDIES, "vag_visibility" = GEN_VISIBLE_NO_UNDIES, "ipc_screen" = "Sunburst", "ipc_antenna" = "None", "flavor_text" = "", "silicon_flavor_text" = "", "ooc_notes" = "", "meat_type" = "Mammalian", "body_model" = MALE, "body_size" = RESIZE_DEFAULT_SIZE, "color_scheme" = OLD_CHARACTER_COLORING)
|
||||
|
||||
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
|
||||
var/custom_tongue = "default" //if your tongue is to be something other than your races
|
||||
var/modified_limbs = list() //prosthetic/amputated limbs
|
||||
@@ -470,6 +405,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(!use_skintones)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Advanced Coloring</h3>"
|
||||
dat += "</b><a style='display:block;width:100px' href='?_src_=prefs;preference=color_scheme;task=input'>[(features["color_scheme"] == ADVANCED_CHARACTER_COLORING) ? "Enabled" : "Disabled"]</a>"
|
||||
|
||||
dat += "<h2>Body Colors</h2>"
|
||||
|
||||
dat += "<b>Primary Color:</b><BR>"
|
||||
@@ -551,6 +489,52 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/color_type = GLOB.colored_mutant_parts[mutant_part] //if it can be coloured, show the appropriate button
|
||||
if(color_type)
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features[color_type]];'> </span> <a href='?_src_=prefs;preference=[color_type];task=input'>Change</a><BR>"
|
||||
else
|
||||
if(features["color_scheme"] == ADVANCED_CHARACTER_COLORING) //advanced individual part colouring system
|
||||
//is it matrixed or does it have extra parts to be coloured?
|
||||
var/find_part = features[mutant_part] || pref_species.mutant_bodyparts[mutant_part]
|
||||
var/find_part_list = GLOB.mutant_reference_list[mutant_part]
|
||||
if(find_part && find_part != "None" && find_part_list)
|
||||
var/datum/sprite_accessory/accessory = find_part_list[find_part]
|
||||
if(accessory)
|
||||
if(accessory.color_src == MATRIXED || accessory.color_src == MUTCOLORS || accessory.color_src == MUTCOLORS2 || accessory.color_src == MUTCOLORS3) //mutcolors1-3 are deprecated now, please don't rely on these in the future
|
||||
var/mutant_string = accessory.mutant_part_string
|
||||
if(istype(accessory, /datum/sprite_accessory/mam_body_markings) || istype(accessory, /datum/sprite_accessory/body_markings))
|
||||
continue
|
||||
var/primary_feature = "[mutant_string]_primary"
|
||||
var/secondary_feature = "[mutant_string]_secondary"
|
||||
var/tertiary_feature = "[mutant_string]_tertiary"
|
||||
if(!features[primary_feature])
|
||||
features[primary_feature] = features["mcolor"]
|
||||
if(!features[secondary_feature])
|
||||
features[secondary_feature] = features["mcolor2"]
|
||||
if(!features[tertiary_feature])
|
||||
features[tertiary_feature] = features["mcolor3"]
|
||||
|
||||
var/matrixed_sections = accessory.matrixed_sections
|
||||
if(accessory.color_src == MATRIXED && !matrixed_sections)
|
||||
message_admins("Sprite Accessory Failure (customization): Accessory [accessory.type] is a matrixed item without any matrixed sections set!")
|
||||
continue
|
||||
else if(accessory.color_src == MATRIXED)
|
||||
switch(matrixed_sections)
|
||||
if(MATRIX_GREEN) //only composed of a green section
|
||||
primary_feature = secondary_feature //swap primary for secondary, so it properly assigns the second colour, reserved for the green section
|
||||
if(MATRIX_BLUE)
|
||||
primary_feature = tertiary_feature //same as above, but the tertiary feature is for the blue section
|
||||
if(MATRIX_RED_BLUE) //composed of a red and blue section
|
||||
secondary_feature = tertiary_feature //swap secondary for tertiary, as blue should always be tertiary
|
||||
if(MATRIX_GREEN_BLUE) //composed of a green and blue section
|
||||
primary_feature = secondary_feature //swap primary for secondary, as first option is green, which is linked to the secondary
|
||||
secondary_feature = tertiary_feature //swap secondary for tertiary, as second option is blue, which is linked to the tertiary
|
||||
dat += "<b>Primary Color</b><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features[primary_feature]];'> </span> <a href='?_src_=prefs;preference=[primary_feature];task=input'>Change</a><BR>"
|
||||
if((accessory.color_src == MATRIXED && (matrixed_sections == MATRIX_RED_BLUE || matrixed_sections == MATRIX_GREEN_BLUE || matrixed_sections == MATRIX_RED_GREEN || matrixed_sections == MATRIX_ALL)) || (accessory.extra && (accessory.extra_color_src == MUTCOLORS || accessory.extra_color_src == MUTCOLORS2 || accessory.extra_color_src == MUTCOLORS3)))
|
||||
dat += "<b>Secondary Color</b><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features[secondary_feature]];'> </span> <a href='?_src_=prefs;preference=[secondary_feature];task=input'>Change</a><BR>"
|
||||
if((accessory.color_src == MATRIXED && matrixed_sections == MATRIX_ALL) || (accessory.extra2 && (accessory.extra2_color_src == MUTCOLORS || accessory.extra2_color_src == MUTCOLORS2 || accessory.extra2_color_src == MUTCOLORS3)))
|
||||
dat += "<b>Tertiary Color</b><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features[tertiary_feature]];'> </span> <a href='?_src_=prefs;preference=[tertiary_feature];task=input'>Change</a><BR>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
@@ -1551,10 +1535,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/prosthetic_type = input(user, "Choose the type of prosthetic", "Character Preference") as null|anything in (list("prosthetic") + GLOB.prosthetic_limb_types)
|
||||
if(prosthetic_type)
|
||||
var/number_of_prosthetics = 0
|
||||
for(var/modification in modified_limbs)
|
||||
if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
|
||||
for(var/modified_limb in modified_limbs)
|
||||
if(modified_limbs[modified_limb][1] == LOADOUT_LIMB_PROSTHETIC && modified_limb != limb_type)
|
||||
number_of_prosthetics += 1
|
||||
if(number_of_prosthetics >= MAXIMUM_LOADOUT_PROSTHETICS && !(limb_type in modified_limbs && modified_limbs[limb_type][1] == LOADOUT_LIMB_PROSTHETIC))
|
||||
if(number_of_prosthetics > MAXIMUM_LOADOUT_PROSTHETICS)
|
||||
to_chat(user, "<span class='danger'>You can only have up to two prosthetic limbs!</span>")
|
||||
else
|
||||
//save the actual prosthetic data
|
||||
@@ -2033,6 +2017,30 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_dors)
|
||||
features["xenodorsal"] = new_dors
|
||||
|
||||
//every single primary/secondary/tertiary colouring done at once
|
||||
if("xenodorsal_primary","xenodorsal_secondary","xenodorsal_tertiary","xhead_primary","xhead_secondary","xhead_tertiary","tail_primary","tail_secondary","tail_tertiary","insect_markings_primary","insect_markings_secondary","insect_markings_tertiary","body_markings_primary","body_markings_secondary","body_markings_tertiary","insect_fluff_primary","insect_fluff_secondary","insect_fluff_tertiary","ears_primary","ears_secondary","ears_tertiary","frills_primary","frills_secondary","frills_tertiary","ipc_antenna_primary","ipc_antenna_secondary","ipc_antenna_tertiary","taur_primary","taur_secondary","taur_tertiary","snout_primary","snout_secondary","snout_tertiary","spines_primary","spines_secondary","spines_tertiary", "mam_body_markings_primary", "mam_body_markings_secondary", "mam_body_markings_tertiary")
|
||||
var/the_feature = features[href_list["preference"]]
|
||||
if(!the_feature)
|
||||
features[href_list["preference"]] = "FFFFFF"
|
||||
the_feature = "FFFFFF"
|
||||
var/new_feature_color = input(user, "Choose your character's mutant part colour:", "Character Preference","#"+features[href_list["preference"]]) as color|null
|
||||
if(new_feature_color)
|
||||
var/temp_hsv = RGBtoHSV(new_feature_color)
|
||||
if(new_feature_color == "#000000")
|
||||
features[href_list["preference"]] = pref_species.default_color
|
||||
else if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3])
|
||||
features[href_list["preference"]] = sanitize_hexcolor(new_feature_color, 6)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
|
||||
//advanced color mode toggle
|
||||
if("color_scheme")
|
||||
if(features["color_scheme"] == ADVANCED_CHARACTER_COLORING)
|
||||
features["color_scheme"] = OLD_CHARACTER_COLORING
|
||||
else
|
||||
features["color_scheme"] = ADVANCED_CHARACTER_COLORING
|
||||
|
||||
//Genital code
|
||||
if("cock_color")
|
||||
var/new_cockcolor = input(user, "Penis color:", "Character Preference","#"+features["cock_color"]) as color|null
|
||||
@@ -2761,8 +2769,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
new_limb.replace_limb(character)
|
||||
qdel(old_part)
|
||||
|
||||
character.regenerate_icons()
|
||||
|
||||
SEND_SIGNAL(character, COMSIG_HUMAN_PREFS_COPIED_TO, src, icon_updates, roundstart_checks)
|
||||
|
||||
//let's be sure the character updates
|
||||
|
||||
@@ -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 38
|
||||
#define SAVEFILE_VERSION_MAX 44
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -226,15 +226,58 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
left_eye_color = "#BAB99E"
|
||||
right_eye_color = "#BAB99E"
|
||||
|
||||
if(current_version < 5000)
|
||||
if(current_version < 43) //extreme changes to how things are coloured (the introduction of the advanced coloring system)
|
||||
features["color_scheme"] = OLD_CHARACTER_COLORING //disable advanced coloring system by default
|
||||
for(var/feature in features)
|
||||
var/feature_value = features[feature]
|
||||
if(feature_value)
|
||||
var/ref_list = GLOB.mutant_reference_list[feature]
|
||||
if(ref_list)
|
||||
var/datum/sprite_accessory/accessory = ref_list[feature_value]
|
||||
if(accessory)
|
||||
var/mutant_string = accessory.mutant_part_string
|
||||
if(!mutant_string)
|
||||
if(istype(accessory, /datum/sprite_accessory/mam_body_markings))
|
||||
mutant_string = "mam_body_markings"
|
||||
var/primary_string = "[mutant_string]_primary"
|
||||
var/secondary_string = "[mutant_string]_secondary"
|
||||
var/tertiary_string = "[mutant_string]_tertiary"
|
||||
if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None")
|
||||
message_admins("Sprite Accessory Failure (migration from [current_version] to 39): Accessory [accessory.type] is a matrixed item without any matrixed sections set!")
|
||||
continue
|
||||
var/primary_exists = features[primary_string]
|
||||
var/secondary_exists = features[secondary_string]
|
||||
var/tertiary_exists = features[tertiary_string]
|
||||
if(accessory.color_src == MATRIXED && !primary_exists && !secondary_exists && !tertiary_exists)
|
||||
features[primary_string] = features["mcolor"]
|
||||
features[secondary_string] = features["mcolor2"]
|
||||
features[tertiary_string] = features["mcolor3"]
|
||||
else if(accessory.color_src == MUTCOLORS && !primary_exists)
|
||||
features[primary_string] = features["mcolor"]
|
||||
else if(accessory.color_src == MUTCOLORS2 && !secondary_exists)
|
||||
features[secondary_string] = features["mcolor2"]
|
||||
else if(accessory.color_src == MUTCOLORS3 && !tertiary_exists)
|
||||
features[tertiary_string] = features["mcolor3"]
|
||||
|
||||
features["color_scheme"] = OLD_CHARACTER_COLORING //advanced is off by default
|
||||
|
||||
if(current_version < 44)
|
||||
var/ctrl_t_binding = S["key_bindings"]["CtrlT"]
|
||||
var/ctrl_m_binding = S["key_bindings"]["CtrlM"]
|
||||
if(length(ctrl_t_binding) && "say_with_indicator" in ctrl_t_binding)
|
||||
S["key_bindings"]["T"] = "say_with_indicator"
|
||||
S["key_bindings"]["CtrlT"] = "say"
|
||||
if(!length(S["key_bindings"]["T"]))
|
||||
S["key_bindings"]["T"] = list("say_with_indicator")
|
||||
else
|
||||
S["key_bindings"]["T"] += "say_with_indicator"
|
||||
S["key_bindings"]["CtrlT"] -= "say_with_indicator"
|
||||
S["key_bindings"]["CtrlT"] += "say"
|
||||
if(length(ctrl_m_binding) && "me_with_indicator" in ctrl_m_binding)
|
||||
S["key_bindings"]["M"] = "me_with_indicator"
|
||||
S["key_bindings"]["CtrlM"] = "me"
|
||||
if(!length(S["key_bindings"]["M"])
|
||||
S["key_bindings"]["M"] = list("me_with_indicator")
|
||||
else
|
||||
S["key_bindings"]["M"] += "me_with_indicator"
|
||||
S["key_bindings"]["CtrlM"] -= "me_with_indicator"
|
||||
S["key_bindings"]["CtrlM"] == "me"
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
@@ -499,6 +542,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S)
|
||||
return FALSE
|
||||
features = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF", "mcolor3" = "FFFFFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "horns_color" = "85615a", "ears" = "None", "wings" = "None", "wings_color" = "FFF", "frills" = "None", "deco_wings" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Plantigrade", "insect_wings" = "Plain", "insect_fluff" = "None", "insect_markings" = "None", "arachnid_legs" = "Plain", "arachnid_spinneret" = "Plain", "arachnid_mandibles" = "Plain", "mam_body_markings" = "Plain", "mam_ears" = "None", "mam_snouts" = "None", "mam_tail" = "None", "mam_tail_animated" = "None", "xenodorsal" = "Standard", "xenohead" = "Standard", "xenotail" = "Xenomorph Tail", "taur" = "None", "genitals_use_skintone" = FALSE, "has_cock" = FALSE, "cock_shape" = DEF_COCK_SHAPE, "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "ffffff", "cock_taur" = FALSE, "has_balls" = FALSE, "balls_color" = "ffffff", "balls_shape" = DEF_BALLS_SHAPE, "balls_size" = BALLS_SIZE_DEF, "balls_cum_rate" = CUM_RATE, "balls_cum_mult" = CUM_RATE_MULT, "balls_efficiency" = CUM_EFFICIENCY, "has_breasts" = FALSE, "breasts_color" = "ffffff", "breasts_size" = BREASTS_SIZE_DEF, "breasts_shape" = DEF_BREASTS_SHAPE, "breasts_producing" = FALSE, "has_vag" = FALSE, "vag_shape" = DEF_VAGINA_SHAPE, "vag_color" = "ffffff", "has_womb" = FALSE, "balls_visibility" = GEN_VISIBLE_NO_UNDIES, "breasts_visibility"= GEN_VISIBLE_NO_UNDIES, "cock_visibility" = GEN_VISIBLE_NO_UNDIES, "vag_visibility" = GEN_VISIBLE_NO_UNDIES, "ipc_screen" = "Sunburst", "ipc_antenna" = "None", "flavor_text" = "", "silicon_flavor_text" = "", "ooc_notes" = "", "meat_type" = "Mammalian", "body_model" = MALE, "body_size" = RESIZE_DEFAULT_SIZE, "color_scheme" = OLD_CHARACTER_COLORING)
|
||||
|
||||
S.cd = "/"
|
||||
if(!slot)
|
||||
slot = default_slot
|
||||
@@ -579,6 +624,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_arachnid_mandibles"] >> features["arachnid_mandibles"]
|
||||
S["feature_horns_color"] >> features["horns_color"]
|
||||
S["feature_wings_color"] >> features["wings_color"]
|
||||
S["feature_color_scheme"] >> features["color_scheme"]
|
||||
S["persistent_scars"] >> persistent_scars
|
||||
S["scars1"] >> scars_list["1"]
|
||||
S["scars2"] >> scars_list["2"]
|
||||
@@ -604,6 +650,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] >> joblessrole
|
||||
|
||||
//Load prefs
|
||||
S["job_preferences"] >> job_preferences
|
||||
|
||||
@@ -656,6 +703,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_vag_visibility"] >> features["vag_visibility"]
|
||||
//womb features
|
||||
S["feature_has_womb"] >> features["has_womb"]
|
||||
|
||||
//flavor text
|
||||
//Let's make our players NOT cry desperately as we wipe their savefiles of their special snowflake texts:
|
||||
if((S["flavor_text"] != "") && (S["flavor_text"] != null) && S["flavor_text"]) //If old text isn't null and isn't "" but still exists.
|
||||
@@ -813,6 +861,32 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["silicon_flavor_text"] = copytext(features["silicon_flavor_text"], 1, MAX_FLAVOR_LEN)
|
||||
features["ooc_notes"] = copytext(features["ooc_notes"], 1, MAX_FLAVOR_LEN)
|
||||
|
||||
//load every advanced coloring mode thing in one go
|
||||
//THIS MUST BE DONE AFTER ALL FEATURE SAVES OR IT WILL NOT WORK
|
||||
for(var/feature in features)
|
||||
var/feature_value = features[feature]
|
||||
if(feature_value)
|
||||
var/ref_list = GLOB.mutant_reference_list[feature]
|
||||
if(ref_list)
|
||||
var/datum/sprite_accessory/accessory = ref_list[feature_value]
|
||||
if(accessory)
|
||||
var/mutant_string = accessory.mutant_part_string
|
||||
if(!mutant_string)
|
||||
if(istype(accessory, /datum/sprite_accessory/mam_body_markings))
|
||||
mutant_string = "mam_body_markings"
|
||||
var/primary_string = "[mutant_string]_primary"
|
||||
var/secondary_string = "[mutant_string]_secondary"
|
||||
var/tertiary_string = "[mutant_string]_tertiary"
|
||||
if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None")
|
||||
message_admins("Sprite Accessory Failure (loading data): Accessory [accessory.type] is a matrixed item without any matrixed sections set!")
|
||||
continue
|
||||
if(S["feature_[primary_string]"])
|
||||
S["feature_[primary_string]"] >> features[primary_string]
|
||||
if(S["feature_[secondary_string]"])
|
||||
S["feature_[secondary_string]"] >> features[secondary_string]
|
||||
if(S["feature_[tertiary_string]"])
|
||||
S["feature_[tertiary_string]"] >> features[tertiary_string]
|
||||
|
||||
persistent_scars = sanitize_integer(persistent_scars)
|
||||
scars_list["1"] = sanitize_text(scars_list["1"])
|
||||
scars_list["2"] = sanitize_text(scars_list["2"])
|
||||
@@ -937,6 +1011,33 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
WRITE_FILE(S["feature_ooc_notes"], features["ooc_notes"])
|
||||
|
||||
WRITE_FILE(S["feature_color_scheme"], features["color_scheme"])
|
||||
|
||||
//save every advanced coloring mode thing in one go
|
||||
for(var/feature in features)
|
||||
var/feature_value = features[feature]
|
||||
if(feature_value)
|
||||
var/ref_list = GLOB.mutant_reference_list[feature]
|
||||
if(ref_list)
|
||||
var/datum/sprite_accessory/accessory = ref_list[feature_value]
|
||||
if(accessory)
|
||||
var/mutant_string = accessory.mutant_part_string
|
||||
if(!mutant_string)
|
||||
if(istype(accessory, /datum/sprite_accessory/mam_body_markings))
|
||||
mutant_string = "mam_body_markings"
|
||||
var/primary_string = "[mutant_string]_primary"
|
||||
var/secondary_string = "[mutant_string]_secondary"
|
||||
var/tertiary_string = "[mutant_string]_tertiary"
|
||||
if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None")
|
||||
message_admins("Sprite Accessory Failure (saving data): Accessory [accessory.type] is a matrixed item without any matrixed sections set!")
|
||||
continue
|
||||
if(features[primary_string])
|
||||
WRITE_FILE(S["feature_[primary_string]"], features[primary_string])
|
||||
if(features[secondary_string])
|
||||
WRITE_FILE(S["feature_[secondary_string]"], features[secondary_string])
|
||||
if(features[tertiary_string])
|
||||
WRITE_FILE(S["feature_[tertiary_string]"], features[tertiary_string])
|
||||
|
||||
//Custom names
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
var/savefile_slot_name = custom_name_id + "_name" //TODO remove this
|
||||
|
||||
@@ -87,4 +87,4 @@
|
||||
msg += "<span class='info'>Adminhelps are also sent to Discord. If no admins are available in game adminhelp anyways and an admin on Discord will see it and respond.</span>"
|
||||
to_chat(src, msg)
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user