From faf06012d90ca0e91ac0fd36319162c42e485e6b Mon Sep 17 00:00:00 2001 From: furran Date: Tue, 5 Dec 2023 17:03:50 -0300 Subject: [PATCH 1/2] show variation menu if the customization has it - Check if selected trait has variations when in a customization menu and if it does, show the variation menu to select a variation. --- src/mutation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mutation.cpp b/src/mutation.cpp index 19451fc063178..35ab65e7b2ce8 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -2415,7 +2415,12 @@ void Character::customize_appearance( customize_appearance_choice choice ) if( has_trait( current_trait ) ) { remove_mutation( current_trait ); } - set_mutation( trait_selected ); + if( !trait_selected->variants.empty() ) { + const mutation_variant *variant = trait_selected->pick_variant_menu(); + set_mutation( trait_selected, variant ); + } else { + set_mutation( trait_selected ); + } if( one_in( 3 ) ) { add_msg( m_neutral, end_message ); } From 85fc28929513ba11b89ac6010d35154f79834b9d Mon Sep 17 00:00:00 2001 From: furran Date: Wed, 6 Dec 2023 12:31:10 -0300 Subject: [PATCH 2/2] adjust the way current hair is displayed --- src/mutation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mutation.cpp b/src/mutation.cpp index 35ab65e7b2ce8..6c198d909a79f 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -2364,12 +2364,11 @@ void Character::customize_appearance( customize_appearance_choice choice ) char_has_trait = true; } - const std::string &entry_name = mutation_name( trait ); + const std::string has_it = char_has_trait ? " *" : ""; amenu.addentry( i, true, MENU_AUTOASSIGN, - char_has_trait ? entry_name + " *" : entry_name - ); + trait->variants.empty() ? mutation_name( trait ) + has_it : trait->name() + has_it ); } };