mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-31 00:49:14 +01:00
porting hair gradient (wip)
it doesn't actually seem to work at all, will continue later
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
var/hair_color = "000"
|
||||
var/hair_style = "Bald"
|
||||
|
||||
|
||||
///Colour used for the hair gradient.
|
||||
var/grad_color = "000"
|
||||
///Style used for the hair gradient.
|
||||
var/grad_style
|
||||
|
||||
|
||||
|
||||
//Facial hair colour and style
|
||||
var/facial_hair_color = "000"
|
||||
var/facial_hair_style = "Shaved"
|
||||
@@ -74,4 +82,4 @@
|
||||
var/last_fire_update
|
||||
var/account_id
|
||||
can_be_held = "micro"
|
||||
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
|
||||
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
|
||||
|
||||
@@ -16,6 +16,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
|
||||
var/wing_color
|
||||
|
||||
///The gradient style used for the mob's hair.
|
||||
var/grad_style
|
||||
///The gradient color used to color the gradient.
|
||||
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.
|
||||
var/exotic_bloodtype = "" //If your race uses a non standard bloodtype (A+, O-, AB-, etc)
|
||||
@@ -426,6 +431,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
if(!hair_hidden || dynamic_hair_suffix)
|
||||
var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER)
|
||||
var/mutable_appearance/gradient_overlay = mutable_appearance(layer = -HAIR_LAYER)
|
||||
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
|
||||
if(!(NOBLOOD in species_traits))
|
||||
hair_overlay.icon = 'icons/mob/human_face.dmi'
|
||||
@@ -461,6 +467,20 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
hair_overlay.color = "#" + hair_color
|
||||
else
|
||||
hair_overlay.color = "#" + H.hair_color
|
||||
|
||||
|
||||
//Gradients
|
||||
grad_style = H.grad_style
|
||||
grad_color = H.grad_color
|
||||
if(grad_style)
|
||||
var/datum/sprite_accessory/gradient = GLOB.hair_gradients_list[grad_style]
|
||||
var/icon/temp = icon(gradient.icon, gradient.icon_state)
|
||||
var/icon/temp_hair = icon(hair_file, hair_state)
|
||||
temp.Blend(temp_hair, ICON_ADD)
|
||||
gradient_overlay.icon = temp
|
||||
gradient_overlay.color = "#" + grad_color
|
||||
|
||||
|
||||
else
|
||||
hair_overlay.color = forced_colour
|
||||
hair_overlay.alpha = hair_alpha
|
||||
@@ -469,6 +489,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
hair_overlay.pixel_y += H.dna.species.offset_features[OFFSET_FACE][2]
|
||||
if(hair_overlay.icon)
|
||||
standing += hair_overlay
|
||||
standing += gradient_overlay
|
||||
|
||||
|
||||
if(standing.len)
|
||||
H.overlays_standing[HAIR_LAYER] = standing
|
||||
|
||||
Reference in New Issue
Block a user