From f973ac8aca445f792b2d4db18ac1e5a7bda7ade4 Mon Sep 17 00:00:00 2001 From: CliffracerX Date: Sun, 3 Sep 2023 16:13:23 -0400 Subject: [PATCH] [MODULAR] Fixes Quickspawn/SimpleTF/genetics eating mutcols (#23061) * One-line-fix for human transformation eating prefs This is a weird timing bug we inherited from TGstation somehow, but I cannot for the life of me figure out *how* it breaks or what a good independent repro is since all the individual parts play nice when called by hand. In a nutshell: randomization prefs is partially overriding normal char prefs despite the former running before the latter, and only when safe_transfer_prefs_to is called during something like a transformation. It's fine when applying to a fully spawned mob. * no spawn, added a sleeping wrapper & INVOKE_ASYNC * Hotfix to avoid random human IDs why is safe_transfer_prefs so cursed and only in a subset of use cases * Tentatively unhackying this * removing nonmodular change from prefs.dm * and removing nonmodular alteration from dna.dm this REALLY should just be fixed upstream --- modular_skyrat/modules/customization/datums/dna.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modular_skyrat/modules/customization/datums/dna.dm b/modular_skyrat/modules/customization/datums/dna.dm index ddc453c2c7a..4ae22fceab5 100644 --- a/modular_skyrat/modules/customization/datums/dna.dm +++ b/modular_skyrat/modules/customization/datums/dna.dm @@ -276,15 +276,15 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block) var/features = dna.unique_features if(dna.features["mcolor"]) - dna.features["mcolor"] = sanitize_hexcolor(get_uni_identity_block(features, DNA_MUTANT_COLOR_BLOCK)) + dna.features["mcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_MUTANT_COLOR_BLOCK)) if(dna.features["mcolor2"]) - dna.features["mcolor2"] = sanitize_hexcolor(get_uni_identity_block(features, DNA_MUTANT_COLOR_2_BLOCK)) + dna.features["mcolor2"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_MUTANT_COLOR_2_BLOCK)) if(dna.features["mcolor3"]) - dna.features["mcolor3"] = sanitize_hexcolor(get_uni_identity_block(features, DNA_MUTANT_COLOR_3_BLOCK)) + dna.features["mcolor3"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_MUTANT_COLOR_3_BLOCK)) if(dna.features["ethcolor"]) - dna.features["ethcolor"] = sanitize_hexcolor(get_uni_identity_block(features, DNA_ETHEREAL_COLOR_BLOCK)) + dna.features["ethcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_ETHEREAL_COLOR_BLOCK)) if(dna.features["skin_color"]) - dna.features["skin_color"] = sanitize_hexcolor(get_uni_identity_block(features, DNA_SKIN_COLOR_BLOCK)) + dna.features["skin_color"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_SKIN_COLOR_BLOCK)) if(icon_update) if(mutcolor_update)