Merge pull request #13037 from timothyteakettle/freedom-in-customisation
turns 304 lines of snowflake code into 24 lines
This commit is contained in:
@@ -993,3 +993,6 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
screen -= S
|
||||
qdel(S)
|
||||
char_render_holders = null
|
||||
|
||||
/client/proc/can_have_part(part_name)
|
||||
return prefs.pref_species.mutant_bodyparts[part_name] || (part_name in GLOB.unlocked_mutant_parts)
|
||||
|
||||
@@ -507,310 +507,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["tail_lizard"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["mam_tail"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["tail_human"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["meat_type"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Meat Type</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=meats;task=input'>[features["meat_type"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["snout"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Snout</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["horns"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Horns</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features["horns_color"]];'> </span> <a href='?_src_=prefs;preference=horns_color;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
if(pref_species.mutant_bodyparts["frills"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Frills</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["spines"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Spines</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["body_markings"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Body Markings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["mam_body_markings"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Species Markings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mam_body_markings;task=input'>[features["mam_body_markings"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
|
||||
if(pref_species.mutant_bodyparts["mam_ears"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Ears</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mam_ears;task=input'>[features["mam_ears"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["ears"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Ears</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(pref_species.mutant_bodyparts["mam_snouts"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Snout</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mam_snouts;task=input'>[features["mam_snouts"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["legs"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Legs</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["deco_wings"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Decorative wings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=deco_wings;task=input'>[features["deco_wings"]]</a>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features["wings_color"]];'> </span> <a href='?_src_=prefs;preference=wings_color;task=input'>Change</a><BR>"
|
||||
|
||||
if(pref_species.mutant_bodyparts["insect_wings"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Insect wings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=insect_wings;task=input'>[features["insect_wings"]]</a>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[features["wings_color"]];'> </span> <a href='?_src_=prefs;preference=wings_color;task=input'>Change</a><BR>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["insect_fluff"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Insect Fluff</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=insect_fluffs;task=input'>[features["insect_fluff"]]</a>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["taur"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tauric Body</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=taur;task=input'>[features["taur"]]</a>"
|
||||
|
||||
if(pref_species.mutant_bodyparts["insect_markings"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Insect markings</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=insect_markings;task=input'>[features["insect_markings"]]</a><BR>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["wings"] && GLOB.r_wings_list.len >1)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Wings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["xenohead"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Caste Head</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=xenohead;task=input'>[features["xenohead"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["xenotail"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=xenotail;task=input'>[features["xenotail"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["xenodorsal"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Dorsal Spines</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=xenodorsal;task=input'>[features["xenodorsal"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["ipc_screen"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Screen</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=ipc_screen;task=input'>[features["ipc_screen"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
if(pref_species.mutant_bodyparts["ipc_antenna"])
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Antenna</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=ipc_antenna;task=input'>[features["ipc_antenna"]]</a>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
for(var/mutant_part in GLOB.all_mutant_parts)
|
||||
if(parent.can_have_part(mutant_part))
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
dat += "<h3>[GLOB.all_mutant_parts[mutant_part]]</h3>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=[mutant_part];task=input'>[features[mutant_part]]</a>"
|
||||
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>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(mutant_category)
|
||||
dat += "</td>"
|
||||
@@ -856,7 +565,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/tauric_shape = FALSE
|
||||
if(features["cock_taur"])
|
||||
var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[features["cock_shape"]]
|
||||
if(P.taur_icon && pref_species.mutant_bodyparts["taur"])
|
||||
if(P.taur_icon && parent.can_have_part("taur"))
|
||||
var/datum/sprite_accessory/taur/T = GLOB.taur_list[features["taur"]]
|
||||
if(T.taur_mode & P.accepted_taurs)
|
||||
tauric_shape = TRUE
|
||||
@@ -1808,14 +1517,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
pref_species = new newtype()
|
||||
//let's ensure that no weird shit happens on species swapping.
|
||||
custom_species = null
|
||||
if(!pref_species.mutant_bodyparts["body_markings"])
|
||||
if(!parent.can_have_part("body_markings"))
|
||||
features["body_markings"] = "None"
|
||||
if(!pref_species.mutant_bodyparts["mam_body_markings"])
|
||||
if(!parent.can_have_part("mam_body_markings"))
|
||||
features["mam_body_markings"] = "None"
|
||||
if(pref_species.mutant_bodyparts["mam_body_markings"])
|
||||
if(parent.can_have_part("mam_body_markings"))
|
||||
if(features["mam_body_markings"] == "None")
|
||||
features["mam_body_markings"] = "Plain"
|
||||
if(pref_species.mutant_bodyparts["tail_lizard"])
|
||||
if(parent.can_have_part("tail_lizard"))
|
||||
features["tail_lizard"] = "Smooth"
|
||||
if(pref_species.id == "felinid")
|
||||
features["mam_tail"] = "Cat"
|
||||
@@ -1943,7 +1652,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["tail_human"] = "None"
|
||||
features["tail_lizard"] = "None"
|
||||
|
||||
if("meats")
|
||||
if("meat_type")
|
||||
var/new_meat
|
||||
new_meat = input(user, "Choose your character's meat type:", "Character Preference") as null|anything in GLOB.meat_types
|
||||
if(new_meat)
|
||||
@@ -2048,7 +1757,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_deco_wings)
|
||||
features["deco_wings"] = new_deco_wings
|
||||
|
||||
if("insect_fluffs")
|
||||
if("insect_fluff")
|
||||
var/new_insect_fluff
|
||||
new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list
|
||||
if(new_insect_fluff)
|
||||
@@ -2196,7 +1905,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("cock_shape")
|
||||
var/new_shape
|
||||
var/list/hockeys = list()
|
||||
if(pref_species.mutant_bodyparts["taur"])
|
||||
if(parent.can_have_part("taur"))
|
||||
var/datum/sprite_accessory/taur/T = GLOB.taur_list[features["taur"]]
|
||||
for(var/A in GLOB.cock_shapes_list)
|
||||
var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[A]
|
||||
@@ -2805,10 +2514,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.dna.nameless = character.nameless
|
||||
character.dna.custom_species = character.custom_species
|
||||
|
||||
if(pref_species.mutant_bodyparts["meat_type"])
|
||||
if((parent && parent.can_have_part("meat_type")) || pref_species.mutant_bodyparts["meat_type"])
|
||||
character.type_of_meat = GLOB.meat_types[features["meat_type"]]
|
||||
|
||||
if(character.dna.species.mutant_bodyparts["legs"] && (character.dna.features["legs"] == "Digitigrade" || character.dna.features["legs"] == "Avian"))
|
||||
if(((parent && parent.can_have_part("legs")) || pref_species.mutant_bodyparts["legs"]) && (character.dna.features["legs"] == "Digitigrade" || character.dna.features["legs"] == "Avian"))
|
||||
pref_species.species_traits |= DIGITIGRADE
|
||||
else
|
||||
pref_species.species_traits -= DIGITIGRADE
|
||||
|
||||
@@ -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 33
|
||||
#define SAVEFILE_VERSION_MAX 34
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
|
||||
Reference in New Issue
Block a user