Skip to content
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

cata_tiles: More robust variant looks-like #58976

Merged
merged 1 commit into from Jul 4, 2022

Conversation

anothersimulacrum
Copy link
Contributor

@anothersimulacrum anothersimulacrum commented Jul 4, 2022

Summary

None

Purpose of change

The previous behavior of drawing variants for overlays would give up if a gendered overlay was not provided. This is wrong, so now try all the normal routes of finding an ungendered overlay, and try for non-active mutations, before giving up.

Describe the solution

This essentially duplicates the logic below, but tries with a variant, whereas below it will not try with a variant because it is trying looks-like, which will not have variants matching the one of the drawn thing.

Describe alternatives you've considered

Less duplication? Because mutations don't have variants, the active mutation section doesn't actually do anything (right now).

Testing

Get 3 items with variants.
Edit your tileset of choice, and replace some tile ids with overlay_wieldedgender_id_var_variant, overlay_wieldedid_var_variant, overlay_wieldedid, check that each gun, when wielded, shows as the tile you defined for it.

Additional context

Cherry-picked from #58669

The previous behavior of drawing variants for overlays would give up if
a gendered overlay was not provided. This is wrong, so now try all
the normal routes of finding an ungendered overlay, and trying for
non-active mutations, before giving up.

This essentially duplicates the logic below, but tries with a variant,
whereas below it will not try with a variant because it is trying
looks-like, which will not have variants matching the one of the drawn
thing.
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jul 4, 2022
@anothersimulacrum anothersimulacrum added the SDL: Tiles / Sound Tiles visual interface and sounds. label Jul 4, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jul 4, 2022
@ZhilkinSerg ZhilkinSerg merged commit 77689cd into CleverRaven:master Jul 4, 2022
@anothersimulacrum anothersimulacrum deleted the variant-tiles branch July 4, 2022 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions SDL: Tiles / Sound Tiles visual interface and sounds.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants