-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make hair styles conform to using variants for colors #70017
Conversation
- Check if selected trait has variations when in a customization menu and if it does, show the variation menu to select a variation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-requesting reviews from non-collaborators: @GuardianDll
I suggest some way of indication of menu items which will prompt for a variant. diff --git a/src/mutation.cpp b/src/mutation.cpp
index 19451fc063..cafb3fb023 100644
--- a/src/mutation.cpp
+++ b/src/mutation.cpp
@@ -2363,13 +2363,9 @@ void Character::customize_appearance( customize_appearance_choice choice )
current_trait = trait;
char_has_trait = true;
}
-
- const std::string &entry_name = mutation_name( trait );
-
- amenu.addentry(
- i, true, MENU_AUTOASSIGN,
- char_has_trait ? entry_name + " *" : entry_name
- );
+ amenu.addentry( i, true, MENU_AUTOASSIGN,
+ ( trait->variants.empty() ? mutation_name( trait ) : string_format( _( "Variant of %s… " ),
+ trait->name() ) ) + ( char_has_trait ? " *" : "" ) );
}
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think tilesets are updated here, they're updated at https://github.com/I-am-Erk/CDDA-Tilesets
It would probably better if changing the hair to use variants and the fix to the customization were in separate PRs - they're not really related, and one of them is really big.
I thought changes to the tileset sprites/images are made at https://github.com/I-am-Erk/CDDA-Tilesets but changes to things like tile_config.json are made here? I might be wrong though
You are right. I'm moving the customization fix to it's own PR |
The tile configs seem to be completely overwritten in #69886 |
@ehughsbaird ouch. You are right. Gonna open an issue in that repo informing them of these changes to hair id. |
Summary
Bugfixes "Make hair styles conform to using variants for colors"
Purpose of change
The purpose of this change is to make all hairstyles conform to using variants for color
Describe the solution
Describe alternatives you've considered
Considered doing the opposite and undoing variant for hairstyles and eye_color, but that felt like going backwards.
Testing
Save file from 0.G: Debug-trimmed.tar.gz
Made a few tests:
Created a new character and selected one of the hairstyles that now conform to the variants color style ('fro black) and checked in game through @ and the sprite (tileset used: GiantDays).
Created a character in the stable 0.G version with the black 'fro hairstyle and exported the save to this build. Loaded the save, observed if there were any error messages related to the changes ( there were some unrelated) and checked if my character still had the same hairstyle. Tested the same thing with the hairstyle short_no_fringe black variant.
Additional context
Some observations: