[MANUAL MIRROR] SPECIES NUKING 2023: Head flags 2: Electric Boogaloo (#76298) [MDB IGNORE] (#22506)

SPECIES NUKING 2023: Head flags 2: Electric Boogaloo (#76298)

Continues the work I started on
https://github.com/tgstation/tgstation/pull/76074
Fixes https://github.com/tgstation/tgstation/issues/73782

Implements a bunch of wrapper procs for hair style, facial hair style,
etc etc the whole nine yards.
Fixes many issues, especially with gradients because I did sloppy tired
code that didn't work there.
Makes head/get_limb_icon() not a disgusting mess (well, at least makes
it less of a disgusting mess).

Actually makes hair and lips depend entirely on the bodypart.

🆑
refactor: Head rendering code has been updated significantly... Again.
Please report any issues with hair, facial hair, lipstick and such.
/🆑

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
This commit is contained in:
GoldenAlpharex
2023-07-16 18:16:12 -04:00
committed by GitHub
co-authored by ChungusGamer666
parent 6ab09f4f28
commit db83be17da
49 changed files with 553 additions and 463 deletions
@@ -82,8 +82,7 @@
relevant_head_flag = HEAD_FACIAL_HAIR
/datum/preference/color/facial_hair_color/apply_to_human(mob/living/carbon/human/target, value)
target.facial_hair_color = value
target.update_body_parts()
target.set_facial_haircolor(value, update = TRUE)
/datum/preference/choiced/facial_hair_gradient
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
@@ -95,9 +94,7 @@
return assoc_to_keys_features(GLOB.facial_hair_gradients_list)
/datum/preference/choiced/facial_hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_style, GRADIENTS_LEN)
target.grad_style[GRADIENT_FACIAL_HAIR_KEY] = value
target.update_body_parts()
target.set_facial_hair_gradient(new_style = value, update = TRUE)
/datum/preference/choiced/facial_hair_gradient/create_default_value()
return "None"
@@ -109,9 +106,7 @@
relevant_head_flag = HEAD_FACIAL_HAIR
/datum/preference/color/facial_hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_color, GRADIENTS_LEN)
target.grad_color[GRADIENT_FACIAL_HAIR_KEY] = value
target.update_body_parts()
target.set_facial_hair_gradient(new_color = value, update = TRUE)
/datum/preference/color/facial_hair_gradient/is_accessible(datum/preferences/preferences)
if (!..(preferences))
@@ -125,7 +120,7 @@
relevant_head_flag = HEAD_HAIR
/datum/preference/color/hair_color/apply_to_human(mob/living/carbon/human/target, value)
target.hair_color = value
target.set_haircolor(value, update = TRUE)
/datum/preference/choiced/hairstyle
savefile_key = "hairstyle_name"
@@ -139,7 +134,7 @@
return generate_possible_values_for_sprite_accessories_on_head(GLOB.hairstyles_list)
/datum/preference/choiced/hairstyle/apply_to_human(mob/living/carbon/human/target, value)
target.hairstyle = value
target.set_hairstyle(value, update = TRUE)
/datum/preference/choiced/hairstyle/compile_constant_data()
var/list/data = ..()
@@ -158,9 +153,7 @@
return assoc_to_keys_features(GLOB.hair_gradients_list)
/datum/preference/choiced/hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_style, GRADIENTS_LEN)
target.grad_style[GRADIENT_HAIR_KEY] = value
target.update_body_parts()
target.set_hair_gradient(new_style = value, update = TRUE)
/datum/preference/choiced/hair_gradient/create_default_value()
return "None"
@@ -172,9 +165,7 @@
relevant_head_flag = HEAD_HAIR
/datum/preference/color/hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_color, GRADIENTS_LEN)
target.grad_color[GRADIENT_HAIR_KEY] = value
target.update_body_parts()
target.set_hair_gradient(new_color = value, update = TRUE)
/datum/preference/color/hair_gradient/is_accessible(datum/preferences/preferences)
if (!..(preferences))