From fdb7cc8166b465e2e5fdf1224271c143a8bfa9b8 Mon Sep 17 00:00:00 2001 From: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:00:26 +0200 Subject: [PATCH] Fixes the randomization of external organs and species features (#84708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## About The Pull Request Humanoids would not have their external organs and features change when being randomized (with mulligans, for example). The ´|=´ operator does nothing if the features list of the humanoid is already populated (i.e. we're not creating the humanoid). This new block instead overwrites each entry of the list. ## Why It's Good For The Game Bugfix. This broke mulligan among some other things. ## Changelog :cl: fix: humanoid species featured are randomized correctly once again /:cl: --- code/datums/dna.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 17cdb20e3c4..e5d4657c176 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -469,7 +469,9 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) generate_dna_blocks() if(randomize_features) for(var/species_type in GLOB.species_prototypes) - features |= GLOB.species_prototypes[species_type].randomize_features() + var/list/new_features = GLOB.species_prototypes[species_type].randomize_features() + for(var/feature in new_features) + features[feature] = new_features[feature] features["mcolor"] = "#[random_color()]"