Skip to content

feat(port): nested crafting categories, UI changes#8059

Open
shmakota wants to merge 9 commits intocataclysmbn:mainfrom
shmakota:nested_categories
Open

feat(port): nested crafting categories, UI changes#8059
shmakota wants to merge 9 commits intocataclysmbn:mainfrom
shmakota:nested_categories

Conversation

@shmakota
Copy link
Collaborator

@shmakota shmakota commented Feb 7, 2026

Purpose of change (The Why)

Continuation of #8059.

The UI can be hard to navigate when there's a ton of recipes. Additionally, the UI can end up unorganized as "fairy sandwich" will not be next to "meat sandwich". As a result, I believe organization could be greatly improved with nested categories.

Describe the solution (The How)

Ports DDA PRs: CleverRaven/Cataclysm-DDA#59924, CleverRaven/Cataclysm-DDA#60761 and CleverRaven/Cataclysm-DDA#60683. Additionally has a few improvements to the UI I made on our end so it feels up to snuff with the rest of the UI.

Changes item cards to show the subcategory of item as well as category now.

This allows for "nested categories" which can be found in the crafting UI under a subcategory. These are used to group similar things in the menu. For example, sandwiches are under "SNACKS" but they're spread out with things like butter and popcorn and such in between them. This allows for better organization and hopefully improved user experience over time as they gain the muscle memory to work with this new system.

Describe alternatives you've considered

Leaving the menu as-is. Although there were concerns with the previous PR about android users suffering more button presses, I think this is an improvement. Additionally we can likely make this toggleable, as it's just a visual grouping thing currently.

Putting all nested recipes under a nested tab. So it would go food > nested > sandwiches, I think this would help organization as it feels weird to make duplicates in the other menus (ham sandwich and fairy sandwich gets moved under snacks, and no longer in meat and junk respectively otherwise)

Testing

Spawn in, go to FOOD > SNACKS > SANDWICHES and craft a sandwich. Favorite the category, notice the entire category properly shows in favorites. Unfavorite it, and favorite a specific item from the category. Notice that it displays on it's own in the favorites menu.

Additional context

showing off a nested category

image

showing off that it now shows subcategory like category / subcategory

image

Checklist

Mandatory

Optional

  • This PR ports commits from DDA or other cataclysm forks.
    • I have added port scope to the PR title.
    • I have attributed original authors in the commit messages adding Co-Authored-By in the commit message.
    • I have linked the URL of original PR(s) in the description.
  • This is a C++ PR that modifies JSON loading or behavior.
    • I have documented the changes in the appropriate location in the docs/ folder.
    • If documentation for this feature does not exist, please write it or at least note its lack in PR description.
    • New localizable fields need to be added to the lang/bn_extract_json_strings.sh script if it does not support them yet.
    • If applicable, add checks on game load that would validate the loaded data.
    • If it modifies format of save files, please add migration from the old format.

shmakota and others added 3 commits February 5, 2026 20:30
ports change CleverRaven/Cataclysm-DDA#59924
needs refined

Co-Authored-By: Dillon Matchett <4514073+bombasticSlacks@users.noreply.github.com>
ports CleverRaven/Cataclysm-DDA#59924 and CleverRaven/Cataclysm-DDA#60761, with improvements on top of it

Co-Authored-By: Dillon Matchett <4514073+bombasticSlacks@users.noreply.github.com>
ports CleverRaven/Cataclysm-DDA#59924 and CleverRaven/Cataclysm-DDA#60761, with improvements on top of it

Co-Authored-By: Dillon Matchett <4514073+bombasticSlacks@users.noreply.github.com>
@github-actions github-actions bot added docs PRs releated to docs page src changes related to source code. labels Feb 7, 2026
@autofix-ci
Copy link
Contributor

autofix-ci bot commented Feb 7, 2026

Autofix has formatted code style violation in this PR.

I edit commits locally (e.g: git, github desktop) and want to keep autofix
  1. Run git pull. this will merge the automated commit into your local copy of the PR branch.
  2. Continue working.
I do not want the automated commit
  1. Format your code locally, then commit it.
  2. Run git push --force to force push your branch. This will overwrite the automated commit on remote with your local one.
  3. Continue working.

If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT.

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Feb 11, 2026
Copy link
Collaborator

@WishDuck WishDuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiled and Load tested
All nested recipes are now valid
All nested categories are optional -> for player benifit and in a certain area
I see nothing wrong with the plan
Green Checkymarky

@scarf005
Copy link
Member

scarf005 commented Mar 23, 2026

maybe #8344 could fix some of the issue

@WishDuck
Copy link
Collaborator

There will probably still be many categorized things that will be outside that system.
While it probably will do well for like arrows & sandwhiches some of the other categories will still be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs PRs releated to docs page JSON related to game datas in JSON format. src changes related to source code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants