From 0edb4c088713a6bf1fc8ccded1371b92ff60d285 Mon Sep 17 00:00:00 2001 From: Roxy <75404941+TealSeer@users.noreply.github.com> Date: Fri, 2 May 2025 17:32:23 -0400 Subject: [PATCH] Fix hair gradients not working for changelings (#3693) ## About The Pull Request Pending my eventual attempt to eliminate this file completely and the subsequent spiral into madness, copies over the appropriate code from the tg `dna.dm` to transfer hair/facial hair gradient style and color when updating appearance from DNA ## Why It's Good For The Game Fixes #3690 ## Proof Of Testing
Screenshots/Videos ![image](https://github.com/user-attachments/assets/3f5ff084-d261-4ed5-bcea-8e29efc6ecf2) me and the bestie
## Changelog :cl: fix: fixed changelings/paradox clones not copying victim hair gradients /:cl: --- modular_skyrat/modules/customization/datums/dna.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modular_skyrat/modules/customization/datums/dna.dm b/modular_skyrat/modules/customization/datums/dna.dm index 8882b93ebd6..7a1e5afc96d 100644 --- a/modular_skyrat/modules/customization/datums/dna.dm +++ b/modular_skyrat/modules/customization/datums/dna.dm @@ -12,6 +12,8 @@ GLOBAL_LIST_INIT(identity_block_lengths, list( "[DNA_FACIAL_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR, "[DNA_EYE_COLOR_LEFT_BLOCK]" = DNA_BLOCK_SIZE_COLOR, "[DNA_EYE_COLOR_RIGHT_BLOCK]" = DNA_BLOCK_SIZE_COLOR, + "[DNA_HAIR_COLOR_GRADIENT_BLOCK]" = DNA_BLOCK_SIZE_COLOR, + "[DNA_FACIAL_HAIR_COLOR_GRADIENT_BLOCK]" = DNA_BLOCK_SIZE_COLOR, )) /** @@ -199,6 +201,8 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block) eye_color_right = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_RIGHT_BLOCK)) set_haircolor(sanitize_hexcolor(get_uni_identity_block(structure, DNA_HAIR_COLOR_BLOCK)), update = FALSE) set_facial_haircolor(sanitize_hexcolor(get_uni_identity_block(structure, DNA_FACIAL_HAIR_COLOR_BLOCK)), update = FALSE) + set_hair_gradient_color(sanitize_hexcolor(get_uni_identity_block(structure, DNA_HAIR_COLOR_GRADIENT_BLOCK)), update = FALSE) + set_facial_hair_gradient_color(sanitize_hexcolor(get_uni_identity_block(structure, DNA_FACIAL_HAIR_COLOR_GRADIENT_BLOCK)), update = FALSE) if(eyeorgancolor_update) add_eye_color_left(eye_color_left, EYE_COLOR_ORGAN_PRIORITY, update_body = FALSE) @@ -208,13 +212,17 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block) set_facial_hairstyle("Shaved", update = FALSE) else var/style = SSaccessories.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), SSaccessories.facial_hairstyles_list.len)] + var/gradient_style = SSaccessories.facial_hair_gradients_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_GRADIENT_BLOCK), length(SSaccessories.facial_hair_gradients_list))] set_facial_hairstyle(style, update = FALSE) + set_facial_hair_gradient_style(gradient_style, update = FALSE) if(HAS_TRAIT(src, TRAIT_BALD)) set_hairstyle("Bald", update = FALSE) else var/style = SSaccessories.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), SSaccessories.hairstyles_list.len)] + var/gradient_style = SSaccessories.hair_gradients_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_GRADIENT_BLOCK), length(SSaccessories.hair_gradients_list))] set_hairstyle(style, update = FALSE) + set_hair_gradient_style(gradient_style, update = FALSE) var/features = dna.unique_features if(dna.features["mcolor"])