This commit is contained in:
Layne
2020-07-01 15:54:16 -07:00
committed by GitHub
parent cdbf339c02
commit 4d70bd70e5
7 changed files with 60 additions and 0 deletions
@@ -0,0 +1,6 @@
GLOBAL_LIST_INIT(hair_gradients, list(
"None" = "none",
"Fade (Up)" = "fadeup",
"Fade (Down)" = "fadedown",
"Vertical Split" = "vsplit"
))
@@ -5,6 +5,10 @@
var/b_hair = 0
var/h_style = "Bald"
var/r_grad = 0
var/g_grad = 0
var/b_grad = 0
var/grad_style = "none"
//Facial hair colour and style
var/r_facial = 0
var/g_facial = 0
@@ -417,11 +417,18 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
hair_style = hair_styles_list["Short Hair"]
if(hair_style && (src.species.get_bodytype(src) in hair_style.species_allowed))
var/icon/grad_s = null
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
var/icon/hair_s_add = new/icon("icon" = hair_style.icon_add, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
if(grad_style)
grad_s = new/icon("icon" = 'icons/mob/hair_gradients.dmi', "icon_state" = GLOB.hair_gradients[grad_style])
grad_s.Blend(hair_s, ICON_AND)
grad_s.Blend(rgb(r_grad, g_grad, b_grad), ICON_MULTIPLY)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_MULTIPLY)
hair_s.Blend(hair_s_add, ICON_ADD)
if(!isnull(grad_s))
hair_s.Blend(grad_s, ICON_OVERLAY)
face_standing.Blend(hair_s, ICON_OVERLAY)