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

feat(UI): More info about items dropped with bags #1594

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Coolthulhu
Copy link
Member

Summary

SUMMARY: Interface "More info about items dropped with bags"

Purpose of change

Inform the player about which items are being dropped when dropping containers and getting volume capacity below used volume.
Add a time cost display to dropping.

Describe the solution

At the moment:

  • Drop UI requires a special caching preset rather than a generic one. I'll unhack it when I find a way to untangle it.
  • When dropping anything, the function for rearranging drops (for better drop time) is called on the dropped items
  • The new preset uses the result of this to calculate time taken for drop and note which items will need to be dropped to match capacity
  • Items which will be dropped are marked (color)

TODO:

  • Untangle preset vs selector - here they need to communicate and the preset must have access to all dropped items, so keeping separate is a problem
  • Allow other presets to be used - presets aren't modular at all, so replacing them has to be done all in one go, but here we want filtering from one preset and coloring+amount from another
  • Improve cache dropping, so that only the changed entries need to be rebuilt
  • Show amounts next to item (in different color if implied)
  • Show implied drops in selection column
  • More tests

Describe alternatives you've considered

Giving up on notpockets and embracing the recursive boxes.
Having notpockets lack proper display.

Testing

  • Spawn some wearable containers and stuff to fill them with
  • Wear containers and pick stuff up
  • Try to drop container
  • Note items being added to drop list
  • Note time taken on UI
  • Confirm drop
  • Check if the dropped items match the ones shown on UI and time taken matches time shown on UI

Additional context

@Coolthulhu
Copy link
Member Author

Almost close to being pretty near to being done.

Screenshot from 2022-09-07 15-06-41

At the moment, it has everything debug-colored:

  • Items/stacks to be dropped fully (blue)
  • Items/stacks to be dropped partially (magenta?)
  • Items that aren't bugged (green)

On the right, you can see 2 categories: things you want to drop and things you'll drop because you have to.

Plus, you can see it will take 2 seconds. Volume is shown post-drop, but I'm thinking of making it show only wanted-to-drop items, so that it shows you how much you have to add to keep it under the limit.

If you try to manually drop more stuff, implied items will be recalculated because some items will not be under the limit and thus you can keep them.

@scarf005 scarf005 marked this pull request as draft April 22, 2023 12:07
@scarf005 scarf005 changed the title [WiP]More info about items dropped with bags More info about items dropped with bags Apr 22, 2023
@scarf005 scarf005 changed the title More info about items dropped with bags feat(ui): More info about items dropped with bags Nov 13, 2023
@scarf005 scarf005 changed the title feat(ui): More info about items dropped with bags feat(UI): More info about items dropped with bags Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant