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

feat(UI): fix odd coloration of tools/components UI, recipes showing same color as ones using rotten components #4757

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

chaosvolt
Copy link
Member

Purpose of change

So recently, crafting GUI coloration changed to make recipes that you can attempt to craft despite lacking subskills to show with brown text. This is a Bad Idea, because "item will be rotten due to rotten ingredients" already uses brown texts, and we shouldn't have this ambiguity.

Describe the solution

In crafting_gui.cpp, set it so the text color for "could craft if known" is light grey instead of yellow, while using yellow for the "can craft but missing some skills" condition.

Reason is, I found in testing that the "could craft if known" condition also affects the UI of basically the entrire tools and components block. I was wondering why it changed to yellow for stuff you can't craft, and thought it looked utterly hiddeous. I was gonna go with red, but that made it look ugly too.

I decided it'd be less disruptive if it used shades of grey in general so that all recipes you can't attempt to craft show as grey, while yellow is reserved for recipes you can try to craft but will struggle with. Using light grey instead of dark grey will also make the UI fluff for recipes you can't currently attempt a shade of grey to designate them as not attemptable, while still being more readable than dark grey, not eye-searing yellow, and not red that blends in with missing tools/components too easily.

Describe alternatives you've considered

Testing

  1. Compiled and load-tested.
  2. Viewed crafting menu, confirmed that recipes I can't attempt show as gray, and the UI fluff shows as light gray specifically.
  3. Spawned in some materials, debugged all skills and hit u, saw bone shivs showing under a yellow name with white UI text, also saw a composite crossbow with light gray name and light gray text.
  4. Can attempt to craft a bone shiv when at zero skills, can't attempt to craft a composite crossbow with all skills but without the recipe learned.
  5. Checked affected file for astyle.

Bone shiv, showing as yellow name since can craft it despite missing skill:
image

Bone shiv highlighted, showing UI text is white as normal since can craft:
image

Composite crossbow, showing not craftable because not learned but has skills to craft it were it learned:
image

Composite crossbow highlighted, showing UI text is light gray instead of yellow now:
image

Additional context

Checklist

@github-actions github-actions bot added the src changes related to source code. label Jun 8, 2024
@scarf005 scarf005 merged commit 115b09e into cataclysmbnteam:main Jun 8, 2024
13 checks passed
@chaosvolt chaosvolt deleted the crafting-gooey-tweaks branch June 8, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants