implement inventory sorting by item type - #8630
Open
romanstingler wants to merge 1 commit into
Open
Conversation
Collaborator
|
Don't worry about Xbox and PS4 builds, we're disabling them soon. |
romanstingler
force-pushed
the
feature/sort-inventory-by-itemtype
branch
from
July 17, 2026 14:53
04dc796 to
cb08830
Compare
Contributor
Author
Ahh thanks, I just spent some time checking regarding PS4 because it has Clang12
The rest is partially-full C++23 compat, so I guess we are fine without PS4 |
Collaborator
|
The C++23 PR has been merged, so you should get better results once you've rebased. And yeah currently it's not full C++23 but rather ~GCC13. We can go to GCC14 once it is available for Amiga (this would get us |
Contributor
Author
|
Nice thanks, but I think for now everything works fine |
romanstingler
force-pushed
the
feature/sort-inventory-by-itemtype
branch
from
July 25, 2026 20:13
cb08830 to
ded0d22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a new sorting mechanism for the player inventory that groups
items by their type (e.g., gold, misc, weapons, armor) before sorting by
size. This improves visual organization by ensuring similar items are
placed together.
Unsorted



Current Sort
New Sort
PS:
Running clang-format -i introduced that change because the WebKit base style sets
SpaceBeforeCpp11BracedList: true, which givesreturn { };Used
std::ranges::*PS2: I Will have a look at the failed stuff
The WebKit style guide is explicit:
So
return { };(with space) is the correct form, andreturn {};(no space) is the wrong one for theWebKitpreset.clang-format18 (currently pinned in CI) flips this and demands{}, which directly contradicts the guide.This is a long-standing bug, tracked and fixed upstream:
6cfedea, which adds a newSpaceInEmptyBracesoption and sets it toAlwaysfor theWebKitpreset, superseding the olderSpaceInEmptyBlockflag (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html#spaceinemptyblock).\version 22in the clang-format docs -> the fix ships in clang-format 22.Verified behaviour across versions
I ran a minimal reproducer (
echo "int main() { return {}; }") throughclang-format -style=webkitfor every version that has a published Docker image:clang-formatreturn {};return {};return {};return {};return {};return { };Reproduced with the official
ghcr.io/jidicula/clang-format:<v>images (project default) and also locally against the v18 and v20 binaries installed on a CachyOS/Arch systemfurthermore, we should be more consistent and clear about what we want to have as minimum requirement.
CMakeLists.txt:336-337
Which means CLANG 17 (15 started having partial support) \ GCC 13 (11 partial support)
.devcontainer/Dockerfile:1-2
Debian12 comes with
clang-format14 but supports up toclang-format-19https://packages.debian.org/search?suite=bookworm§ion=all&arch=any&searchon=names&keywords=clang-format
Another discrepancy is the Amiga container image tag says gcc10 but CMake reports GNU 13.2.0.