Skip to content

Commit

Permalink
Merge pull request #70025 from furran/fix_customization
Browse files Browse the repository at this point in the history
Fix in-game customization
  • Loading branch information
Maleclypse authored Dec 8, 2023
2 parents 4c4d1d9 + 0b92f3c commit 433a11b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mutation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
};

Expand Down Expand Up @@ -2415,7 +2414,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 );
}
Expand Down

0 comments on commit 433a11b

Please sign in to comment.