Revert "Revert "Revert "Hair_gradients part one."""

This reverts commit c5d8bb5fb3.
This commit is contained in:
QuoteFox
2021-03-27 10:56:23 +00:00
parent 6365c7c895
commit b81d6bccba
6 changed files with 0 additions and 59 deletions
-20
View File
@@ -88,22 +88,6 @@
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
//gradients
GLOBAL_LIST_INIT(hair_gradients, list(
"None" = "none",
"Fade (Up)" = "fadeup",
"Fade (Down)" = "fadedown",
"Fade Low (Up)" = "fadeup_low",
"Bottom Flat" = "bottomflat",
"Fade Low (Down)" = "fadedown_low",
"Vertical Split" = "vsplit",
"Reflected" = "reflected",
"Reflected (Inverted)" = "reflected_inverse",
"Reflected High" = "reflected_high",
"Reflected High (Inverted)" = "reflected_inverse_high",
"Wavy" = "wavy"
))
//creates every subtype of prototype (excluding prototype) and adds it to list L.
//if no list/L is provided, one is created.
/proc/init_subtypes(prototype, list/L)
@@ -121,7 +105,3 @@ GLOBAL_LIST_INIT(hair_gradients, list(
for(var/path in subtypesof(prototype))
L+= path
return L
//hair gradient list. Since it shouldn't need to have a seperate datum list.sanitize_inlist
-19
View File
@@ -92,8 +92,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/hair_color = "000" //Hair color
var/facial_hair_style = "Shaved" //Face hair type
var/facial_hair_color = "000" //Facial hair color
var/grad_style = "None" //Hair Gradient style
var/grad_color = "#000000" //Hair Gradient color
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
var/wing_color = "fff" //Wing color
@@ -474,9 +472,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a>"
dat += "<a href='?_src_=prefs;preference=previous_hair_style;task=input'>&lt;</a> <a href='?_src_=prefs;preference=next_hair_style;task=input'>&gt;</a><BR>"
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<h3>Hair Gradiant</h3>"
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=grad_style;task=input'>[grad_style]</a>"
dat += "<span style='border:1px solid #161616; background-color: #[grad_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=grad;task=input'>Change</a><BR>"
dat += "<h3>Facial Hair Style</h3>"
@@ -1752,18 +1747,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(hair_style == "Tail Hair" && clientckey <> "quotefox")
hair_style = "Bald"
if("grad_style")
var/new_grad_style
new_grad_style = input(user, "Choose your character's hair gradiant:", "Character Preference") as null|anything in GLOB.hair_gradients
if(new_grad_style)
grad_style = new_grad_style
if("grad")
var/new_grad
new_grad = input(user, "Choose your character's gradiant color:", "Character Preference", new_grad) as color|null
if(new_grad)
grad_color = sanitize_hexcolor(new_grad)
if("facial")
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference","#"+facial_hair_color) as color|null
if(new_facial)
@@ -2720,13 +2703,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
organ_eyes.old_eye_color = eye_color
character.hair_color = hair_color
character.facial_hair_color = facial_hair_color
character.grad_color = grad_color
character.wing_color = wing_color
character.skin_tone = skin_tone
character.hair_style = hair_style
character.facial_hair_style = facial_hair_style
character.grad_style = grad_style
character.underwear = underwear
character.saved_underwear = underwear
@@ -311,12 +311,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["body_size"] >> body_size
S["hair_color"] >> hair_color
S["facial_hair_color"] >> facial_hair_color
S["grad_color"] >> grad_color
S["eye_color"] >> eye_color
S["skin_tone"] >> skin_tone
S["hair_style_name"] >> hair_style
S["facial_style_name"] >> facial_hair_style
S["grad_style_name"] >> grad_style
S["underwear"] >> underwear
S["undie_color"] >> undie_color
S["undershirt"] >> undershirt
@@ -482,7 +480,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
else
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_female_list)
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_female_list)
grad_style = sanitize_inlist(grad_style, GLOB.hair_gradients)
underwear = sanitize_inlist(underwear, GLOB.underwear_list)
undie_color = sanitize_hexcolor(undie_color, 3, 0, initial(undie_color))
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list)
@@ -492,7 +489,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
hair_color = sanitize_hexcolor(hair_color, 3, 0)
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
grad_color = sanitize_hexcolor(grad_color, 6, 1)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
@@ -562,12 +558,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["age"] , age)
WRITE_FILE(S["hair_color"] , hair_color)
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
WRITE_FILE(S["grad_color"] , grad_color)
WRITE_FILE(S["eye_color"] , eye_color)
WRITE_FILE(S["skin_tone"] , skin_tone)
WRITE_FILE(S["hair_style_name"] , hair_style)
WRITE_FILE(S["facial_style_name"] , facial_hair_style)
WRITE_FILE(S["grad_style_name"] , grad_style)
WRITE_FILE(S["underwear"] , underwear)
WRITE_FILE(S["body_size"] , body_size)
WRITE_FILE(S["undie_color"] , undie_color)
@@ -14,9 +14,6 @@
var/facial_hair_color = "000"
var/facial_hair_style = "Shaved"
var/grad_style = "none"
var/grad_color = "#000000"
//Eye colour
var/eye_color = "000"
@@ -15,7 +15,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/hair_color // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
var/wing_color
var/grad_color
var/use_skintones = 0 // does it use skintones or not? (spoiler alert this is only used by humans)
var/exotic_blood = "" // If your race wants to bleed something other than bog standard blood, change this to reagent id.
@@ -468,16 +467,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(OFFSET_FACE in H.dna.species.offset_features)
hair_overlay.pixel_x += H.dna.species.offset_features[OFFSET_FACE][1]
hair_overlay.pixel_y += H.dna.species.offset_features[OFFSET_FACE][2]
if(H.grad_style)
var/icon/grad_s = new/icon("icon" = 'icons/mob/hair_gradients.dmi', "icon_state" = GLOB.hair_gradients[H.grad_style])
var/grad_f_color = null
if(grad_color)
grad_f_color = "#" + grad_color
else
grad_f_color = "#" + H.grad_color
grad_s.Blend(grad_f_color, ICON_ADD)
hair_overlay.filters = filter(type="layer", icon = grad_s, blend_mode = BLEND_INSET_OVERLAY)
if(hair_overlay.icon)
standing += hair_overlay
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB