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

inventory_selector: clean up deprecated code #56427

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

andrei8l
Copy link
Contributor

Summary

None

Purpose of change

There's a lot of confusing, deprecated code in inventory_ui.
Items gets stacked and moved around for no good reason several times.
Items in a trader's inventory gets sorted under "Items Worn" instead of categorizing correctly (the bug I was trying to fix!)

Describe the solution

Spank deprecated and/or duplicated code.
Put the items in the right columns/categories instead of moving them with toggle_categorize_contained() after building the list.

Describe alternatives you've considered

N/A

Testing

Every UI based on inventory_selector (inventory, eat, multidrop, unload, activate, pickup, compare, etc) should look and function exactly the same as before with these 3 changes:

  • items in magazine{s, wells} aren't shown anymore (batteries, pen ink, etc)
  • all trader items are categorized correctly in the trade UI. Items stashed in worn/wielded containers aren't listed under "Items Worn" anymore
  • contents in the same category as their container get sorted under their container even when the column is forced to not indent

Additional context

N/A

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Mar 28, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 28, 2022
@andrei8l andrei8l marked this pull request as ready for review March 28, 2022 15:28
@Maleclypse Maleclypse added NPC / Factions NPCs, AI, Speech, Factions, Ownership Info / User Interface Game - player communication, menus, etc. Controls / Input Keyboard, mouse, keybindings, input UI, etc. labels Mar 28, 2022
@kevingranade kevingranade merged commit cbd626a into CleverRaven:master Apr 4, 2022
@andrei8l
Copy link
Contributor Author

andrei8l commented Apr 4, 2022

Thanks for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Controls / Input Keyboard, mouse, keybindings, input UI, etc. Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants