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

Allow marking construction recipes as favorite, sort recipes by name in construction UI #2109

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

olanti-p
Copy link
Contributor

Summary

SUMMARY: Interface "Allow marking construction recipes as favorite, sort recipes by name in construction UI"

Purpose of change

  • Allow marking construction recipes as favorite
    QoL feature, useful for highlighting some of the common recipes like furniture disassembly or cleaning window from shards
  • Sort recipes by name in construction UI
    To make skimming the list not painful with languages where "build" can be translated differently depending on context

Describe the solution

  • Add separate construction category for favorites, add a keybind to toggle favorite, store favorite list in uistate
  • Use localized_compare to sort by translated name according to user locale

Testing

Added and removed some recipes to/from favorites, saved & loaded to ensure they keep their favorite status.
Switched to Russian and ensured the construction order is alphabetic.

@scarf005 scarf005 added src changes related to source code. JSON related to game datas in JSON format. labels Oct 26, 2022
@Coolthulhu Coolthulhu self-assigned this Oct 30, 2022
@Coolthulhu Coolthulhu merged commit 2fb69f3 into cataclysmbnteam:upload Oct 31, 2022
@Coolthulhu
Copy link
Member

I just noticed that page up/down has misleading name in keybinds. In construction menu, it means "show next/previous stage", but it is listed as "page up/down" in keybinds.

@olanti-p olanti-p deleted the improve-construct-ui branch December 1, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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