Melting Snowflakes & (Adds/Changes Frills & Adds Body Markings)

This commit is contained in:
KasparoVy
2015-12-26 00:48:01 -05:00
parent 0f8f514671
commit be3bb885f2
13 changed files with 224 additions and 76 deletions
+39 -4
View File
@@ -110,8 +110,12 @@ datum/preferences
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/horns = "None" //Horn style
var/m_style = "None" //Marking style
var/r_markings = 0 //Marking colour
var/g_markings = 0 //Marking colour
var/b_markings = 0 //Marking colour
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
var/g_hair = 0 //Hair color
var/b_hair = 0 //Hair color
@@ -354,10 +358,14 @@ datum/preferences
dat += "[TextPreview(flavor_text)]...<br>"
dat += "<br>"
if(species == "Unathi")
if(species == "Unathi") //Species that have horns.
dat += "<br><b>Horns</b><br>"
dat += "Style: <a href='?_src_=prefs;preference=horns;task=input'>[horns]</a><br>"
dat += "<br><b>Body Markings</b><br>"
dat += "<a href='?_src_=prefs;preference=markings;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings)]'><tr><td>__</td></tr></table></font> "
dat += "<br>Style: <a href='?_src_=prefs;preference=m_style;task=input'>[m_style]</a><br>"
var/hairname = "Hair"
if(species == "Machine")
hairname = "Frame Color"
@@ -374,7 +382,7 @@ datum/preferences
if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
dat += "<br><b>Body Color</b><br>"
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font>"
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font><br>"
if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
dat += "<br><b>Body Accessory</b><br>"
@@ -1206,6 +1214,28 @@ datum/preferences
if(new_horn_style)
horns = new_horn_style
if("markings")
if(species == "Unathi")
var/input = "Choose the colour of your your character's body markings:"
var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null
if(new_markings)
r_markings = hex2num(copytext(new_markings, 2, 4))
g_markings = hex2num(copytext(new_markings, 4, 6))
b_markings = hex2num(copytext(new_markings, 6, 8))
if("m_style")
var/list/valid_markings = list()
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
if( !(species in M.species_allowed))
continue
valid_markings[markingstyle] = marking_styles_list[markingstyle]
var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings
if(new_marking_style)
m_style = new_marking_style
if("body_accessory")
var/list/possible_body_accessories = list()
if(check_rights(R_ADMIN, 1, user))
@@ -1625,8 +1655,13 @@ datum/preferences
character.undershirt = undershirt
character.socks = socks
if(character.species.name == "Unathi")
if(character.species.bodyflags & HAS_HORNS)
character.horns = horns
if(character.species.bodyflags & HAS_MARKINGS)
character.r_markings = r_markings
character.g_markings = g_markings
character.b_markings = b_markings
character.m_style = m_style
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
@@ -124,6 +124,9 @@
S["spawnpoint"] >> spawnpoint
//colors to be consolidated into hex strings (requires some work with dna code)
S["markings_red"] >> r_markings
S["markings_green"] >> g_markings
S["markings_blue"] >> b_markings
S["hair_red"] >> r_hair
S["hair_green"] >> g_hair
S["hair_blue"] >> b_hair
@@ -135,6 +138,7 @@
S["skin_green"] >> g_skin
S["skin_blue"] >> b_skin
S["horn_style_name"] >> horns
S["marking_style_name"] >> m_style
S["hair_style_name"] >> h_style
S["facial_style_name"] >> f_style
S["eyes_red"] >> r_eyes
@@ -188,6 +192,9 @@
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings))
g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings))
b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings))
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
@@ -199,6 +206,7 @@
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))
m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style))
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))