-Added two new types of mutant accessories for humans: tail_human and ears. These ears are considered mutant parts and don't override normal human ears.

-Added one ear and one tail accessory to these categories, obtained from the kitty ears. The ears are obviously cat ears, but the tail can pass for a monkey tail without ears.
-Humans can now also edit alien/mutant colours. They have access to the full range of colours, but if the player switches back to lizard and the colour is too dark, it'll be reset to the default.
-Renamed the original tail to tail_lizard. All references are properly updated and nothing has to be changed.
-Could not solve an annoying bug with the setup window, where a lizard tail is rendered whenever a human tail is set. This problem only exists in the setup window and does not affect the sprite in-game.
This commit is contained in:
Ricotez
2015-06-27 20:57:54 +02:00
parent b395eeabd5
commit b8811f23e0
12 changed files with 240 additions and 92 deletions
+78 -43
View File
@@ -61,7 +61,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
var/datum/species/pref_species = new /datum/species/human() //Mutant race
var/list/features = list("mcolor" = "FFF", "tail" = "Smooth", "snout" = "Round", "horns" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None")
var/list/features = list("mcolor" = "FFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None")
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
@@ -238,69 +238,90 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
dat += "</td>"
if(MUTCOLORS in pref_species.specflags)
if(config.mutant_races) //We don't allow mutant bodyparts for humans either unless this is true.
dat += "<td valign='top' width='21%'>"
if((MUTCOLORS in pref_species.specflags) || (MUTCOLORS_PARTSONLY in pref_species.specflags))
dat += "<h3>Alien Color</h3>"
dat += "<td valign='top' width='21%'>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<h3>Alien/Mutant Color</h3>"
dat += "</td>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
if("tail" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Tail</h3>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=tail;task=input'>[features["tail"]]</a><BR>"
dat += "<h3>Tail</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Snout</h3>"
//If someone sets more than one tail category for a species, we assume it's a bug and display only one. Hence the else if.
else if("tail_human" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
dat += "<h3>Tail</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Horns</h3>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
dat += "<h3>Snout</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Frills</h3>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "<h3>Horns</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Spines</h3>"
if("ears" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "<h3>Ears</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
dat += "<h3>Body Markings</h3>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "<h3>Frills</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "</td>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Spines</h3>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "</td>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Body Markings</h3>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "</td>"
dat += "</tr></table>"
@@ -791,24 +812,32 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
if(result)
var/newtype = roundstart_species[result]
pref_species = new newtype()
if(features["mcolor"] == "#000")
//Now that we changed our species, we must verify that the mutant colour is still allowed.
var/temp_hsv = RGBtoHSV(features["mcolor"])
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
features["mcolor"] = pref_species.default_color
if("mutant_color")
var/new_mutantcolor = input(user, "Choose your character's alien skin color:", "Character Preference") as color|null
var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference") as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
if(new_mutantcolor == "#000000")
features["mcolor"] = pref_species.default_color
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
else if(MUTCOLORS_PARTSONLY in pref_species.specflags || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
else
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
if("tail")
if("tail_human")
var/new_tail
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_human
if(new_tail)
features["tail"] = new_tail
features["tail_human"] = new_tail
if("tail_lizard")
var/new_tail
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_lizard
if(new_tail)
features["tail_lizard"] = new_tail
if("snout")
var/new_snout
@@ -822,6 +851,12 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
if(new_horns)
features["horns"] = new_horns
if("ears")
var/new_ears
new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in ears_list
if(new_ears)
features["ears"] = new_ears
if("frills")
var/new_frills
new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in frills_list
+9 -3
View File
@@ -187,9 +187,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["socks"] >> socks
S["backbag"] >> backbag
S["feature_mcolor"] >> features["mcolor"]
S["feature_lizard_tail"] >> features["tail"]
S["feature_lizard_tail"] >> features["tail_lizard"]
S["feature_human_tail"] >> features["tail_human"]
S["feature_lizard_snout"] >> features["snout"]
S["feature_lizard_horns"] >> features["horns"]
S["feature_human_ears"] >> features["ears"]
S["feature_lizard_frills"] >> features["frills"]
S["feature_lizard_spines"] >> features["spines"]
S["feature_lizard_body_markings"] >> features["body_markings"]
@@ -245,9 +247,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
skin_tone = sanitize_inlist(skin_tone, skin_tones)
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
features["tail"] = sanitize_inlist(features["tail"], tails_list)
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], tails_list_lizard)
features["tail_human"] = sanitize_inlist(features["tail_human"], tails_list_human)
features["snout"] = sanitize_inlist(features["snout"], snouts_list)
features["horns"] = sanitize_inlist(features["horns"], horns_list)
features["ears"] = sanitize_inlist(features["ears"], ears_list)
features["frills"] = sanitize_inlist(features["frills"], frills_list)
features["spines"] = sanitize_inlist(features["spines"], spines_list)
features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list)
@@ -292,9 +296,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["backbag"] << backbag
S["species"] << pref_species.name
S["feature_mcolor"] << features["mcolor"]
S["feature_lizard_tail"] << features["tail"]
S["feature_lizard_tail"] << features["tail_lizard"]
S["feature_human_tail"] << features["tail_human"]
S["feature_lizard_snout"] << features["snout"]
S["feature_lizard_horns"] << features["horns"]
S["feature_human_ears"] << features["ears"]
S["feature_lizard_frills"] << features["frills"]
S["feature_lizard_spines"] << features["spines"]
S["feature_lizard_body_markings"] << features["body_markings"]