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

Mainmenu: Properly sort mods and games #12758

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

SmallJoker
Copy link
Member

@SmallJoker SmallJoker commented Sep 11, 2022

This also removes trivial and unused pkgmgr functions
Fixes a bug caused by sorting in 2133fc8

To do

This PR is Ready for Review.

How to test

  1. The removed functions must not be used anywhere
  2. Creating a world works properly (correct game ID)
  3. User-facing content listings are sorted (games, mods)

Bonus: The mods are now also sorted in the Settings tab.

This also removes trivial and unused pkgmgr functions
Fixes a bug caused by sorting in 2133fc8
@SmallJoker SmallJoker added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Bugfix 🐛 PRs that fix a bug @ Mainmenu labels Sep 11, 2022
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

Looks correct

--- Scans a directory recursively for mods and adds them to `listing`
-- @param path Absolute directory path to scan recursively
-- @param virtual_path Prettified unique path (e.g. "mods", "mods/mt_modpack")
-- @param listing Input. Flat array to insert located mods and modpacks
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't "Input" be "Output"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes and no. It's a mandatory table input which is then modified by reference

@SmallJoker SmallJoker merged commit bc3dccc into minetest:master Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug High priority @ Mainmenu Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants