Adds Unathi Horn and Tail Customization

Does not include tail colour correction.
In this iteration, the horns do not have their own colour-- they use the
skin colour.
This commit is contained in:
KasparoVy
2015-12-21 22:55:39 -05:00
parent 9feda771fd
commit 0f8f514671
11 changed files with 148 additions and 11 deletions
+20
View File
@@ -111,6 +111,7 @@ datum/preferences
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/horns = "None" //Horn style
var/r_hair = 0 //Hair color
var/g_hair = 0 //Hair color
var/b_hair = 0 //Hair color
@@ -353,6 +354,10 @@ datum/preferences
dat += "[TextPreview(flavor_text)]...<br>"
dat += "<br>"
if(species == "Unathi")
dat += "<br><b>Horns</b><br>"
dat += "Style: <a href='?_src_=prefs;preference=horns;task=input'>[horns]</a><br>"
var/hairname = "Hair"
if(species == "Machine")
hairname = "Frame Color"
@@ -1188,6 +1193,19 @@ datum/preferences
if(new_h_style)
h_style = new_h_style
if("horns")
var/list/valid_hornstyles = list()
for(var/hornstyle in horn_styles_list)
var/datum/sprite_accessory/H = horn_styles_list[hornstyle]
if( !(species in H.species_allowed))
continue
valid_hornstyles[hornstyle] = horn_styles_list[hornstyle]
var/new_horn_style = input(user, "Choose your character's horn style:", "Character Preference") as null|anything in valid_hornstyles
if(new_horn_style)
horns = new_horn_style
if("body_accessory")
var/list/possible_body_accessories = list()
if(check_rights(R_ADMIN, 1, user))
@@ -1607,6 +1625,8 @@ datum/preferences
character.undershirt = undershirt
character.socks = socks
if(character.species.name == "Unathi")
character.horns = horns
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
@@ -134,6 +134,7 @@
S["skin_red"] >> r_skin
S["skin_green"] >> g_skin
S["skin_blue"] >> b_skin
S["horn_style_name"] >> horns
S["hair_style_name"] >> h_style
S["facial_style_name"] >> f_style
S["eyes_red"] >> r_eyes
@@ -197,6 +198,7 @@
r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin))
g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin))
b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin))
horns = sanitize_inlist(horns, horn_styles_list, initial(horns))
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))