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

inv_ui: fix accumulated minor issues #62423

Merged
merged 5 commits into from
Nov 28, 2022

Conversation

andrei8l
Copy link
Contributor

@andrei8l andrei8l commented Nov 27, 2022

Summary

None

Purpose of change

The inventory UI has accumulated a few smaller issues:

  • you need to press ; twice to toggle category mode in the pickup menu
  • save state is not respected in the pickup menu so you always start in hierarchy mode
  • integrated armor and internal CBM containers are lumped into ITEMS WORN
  • there is no indication of the current uimode and people don't realize they can change it
  • held item stacks with identical worn item. Fixes Wielded item is displayed as worn, if wearing an identical item. #59124
  • corpse-pocket contents (such as samples) are counted as contained items but not displayed anywhere
  • collapsed empty items don't stack with uncollapsed empty item even though there's no visible difference

Describe the solution

  • Fix categorization of map items based on current uimode
  • Use one separate save state for the pickup menu, one for the inventory and trade UI, and a common one for every other UI based on inventory_selector
  • Split integrated armor and CBM containers to new categories in the worn column (as requested by Fris0uman)
  • Add a uimode hint
  • Don't count contents of corpse pockets
  • Ignore collapsed status for empty items

Describe alternatives you've considered

N/A

Testing

before

CBM container and mutation armor are mixed with items worn
Screenshot from 2022-11-27 12-51-08

Corpse of a mutant says it contains 4 items but only displays one
Screenshot from 2022-11-27 12-51-58

Items in the map column aren't categorized
Screenshot from 2022-11-27 15-14-48

after

CBM container and mutation armor are in separate categories
Screenshot from 2022-11-27 15-13-30

Corpse of a mutant says it contains only the visible items
Screenshot from 2022-11-27 12-51-48

Items in the map column respect ui mode - this is technically new behaviour but I believe people will welcome this change. I can try to preserve the old behaviour if needed.
Screenshot from 2022-11-27 15-14-32

Toggle ui mode back and forth in various inventory UIs and check that items are in the right column and category.
Close and reopen the various inventory UIs and confirm that the chosen state persists.
Save and reload and confirm that the state persists.

Additional context

N/A

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Info / User Interface Game - player communication, menus, etc. Items: Containers Things that hold other things astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 27, 2022
@andrei8l andrei8l force-pushed the inv_ui-refresh branch 5 times, most recently from dcd634d to f7fcb0a Compare November 27, 2022 14:25
@github-actions github-actions bot added the <Bugfix> This is a fix for a bug (or closes open issue) label Nov 27, 2022
@andrei8l andrei8l marked this pull request as ready for review November 27, 2022 18:06
@andrei8l
Copy link
Contributor Author

I really want to get this in 0.G so please tell me if anything seems too risky so I can take it out or tone it down.

@ZhilkinSerg ZhilkinSerg merged commit 4034a38 into CleverRaven:master Nov 28, 2022
@andrei8l
Copy link
Contributor Author

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 <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. Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants