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

Fix zone sorting and category display in advanced inventory UI. #41820

Merged
merged 5 commits into from
Jul 8, 2020

Conversation

EvgenijM86
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix zone sorting and category display in advanced inventory UI."

Purpose of change

Fix #41037
And also change category display in advanced inventory UI.

Describe the solution

Add a bool flag in get_category() that controls if we want to get category of the items itself, or it's contents. Set that flag too true in 3 places (false by default).

Describe alternatives you've considered

None.

Testing

Containers display correct category, depending on their contents.
Zone sorting seems to place containers in correct zones, depending on their contents.

Additional context

image

@anothersimulacrum anothersimulacrum added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones labels Jul 4, 2020
@EvgenijM86
Copy link
Contributor Author

EvgenijM86 commented Jul 4, 2020

Note: category is now dynamic and depends on container contents. If category values are cached in Zone manager or advanced inventory UI AND are not updated when item is updated, then it may lead to outdated category being displayed. So far I have not seen this happened. But maybe someone who knows the code of Zone manager or advanced inventory UI should review this before merging.

src/item.h Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autosort doesn't sort Items in Containers
4 participants