It's time for hair color revolution here too!

-Aye greetings from downstream hell where I managed to solve the locally intense ADD vs MULTIPLY blend mode discource once and for all with a fresh as hell new option that combines the best of both worlds without the downsides.
-You can now have hairstyles that retain both, shading and highlights in every color how cool is that?
-Got told to port this stuff up here too so you're welcome. Spread the word if ya want. Planning to hit up the other blend stuffs as well some time, but here's a little something for now.
This commit is contained in:
Verkister
2017-10-28 17:00:21 +03:00
parent 957b6daecc
commit 404ac0f42c
4 changed files with 10 additions and 5 deletions

View File

@@ -381,11 +381,13 @@ var/global/list/damage_icon_parts = list()
face_standing.Blend(facial_s, ICON_OVERLAY)
if(h_style && !(head && (head.flags_inv & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
var/datum/sprite_accessory/hair/hair_style = hair_styles_list[h_style]
if(hair_style && (src.species.get_bodytype(src) in hair_style.species_allowed))
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)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_MULTIPLY)
hair_s.Blend(hair_s_add, ICON_ADD)
face_standing.Blend(hair_s, ICON_OVERLAY)

View File

@@ -45,7 +45,8 @@
/datum/sprite_accessory/hair
icon = 'icons/mob/Human_face.dmi' // default icon for all hairs
icon = 'icons/mob/Human_face_m.dmi' // default icon for all hairs
var/icon_add = 'icons/mob/human_face.dmi'
bald
name = "Bald"

View File

@@ -89,11 +89,13 @@ var/global/list/limb_icon_cache = list()
overlays |= facial_s
if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
var/datum/sprite_accessory/hair/hair_style = hair_styles_list[owner.h_style]
if(hair_style && (species.get_bodytype(owner) in hair_style.species_allowed))
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 && islist(h_col) && h_col.len >= 3)
hair_s.Blend(rgb(h_col[1], h_col[2], h_col[3]), ICON_ADD)
hair_s.Blend(rgb(h_col[1], h_col[2], h_col[3]), ICON_MULTIPLY)
hair_s.Blend(hair_s_add, ICON_ADD)
overlays |= hair_s
return mob_icon