diff --git a/src/avatar.h b/src/avatar.h index 2d602dedde5c7..286b157191ff3 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -92,6 +92,7 @@ class avatar : public Character bool create( character_type type, const std::string &tempname = "" ); void add_profession_items(); void randomize( bool random_scenario, bool play_now = false ); + void randomize_cosmetics(); bool load_template( const std::string &template_name, pool_type & ); void save_template( const std::string &name, pool_type ); void character_to_template( const std::string &name ); diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index 7f2c1e9a89a34..a1aa09f163105 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -579,6 +579,14 @@ void avatar::randomize( const bool random_scenario, bool play_now ) } } + randomize_cosmetics(); + + // Restart cardio accumulator + reset_cardio_acc(); +} + +void avatar::randomize_cosmetics() +{ randomize_cosmetic_trait( type_hair_style ); randomize_cosmetic_trait( type_skin_tone ); randomize_cosmetic_trait( type_eye_color ); @@ -586,9 +594,6 @@ void avatar::randomize( const bool random_scenario, bool play_now ) if( male && one_in( 2 ) ) { randomize_cosmetic_trait( type_facial_hair ); } - - // Restart cardio accumulator - reset_cardio_acc(); } void avatar::add_profession_items() @@ -672,6 +677,7 @@ bool avatar::create( character_type type, const std::string &tempname ) switch( type ) { case character_type::CUSTOM: + randomize_cosmetics(); break; case character_type::RANDOM: //random scenario, default name if exist