-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Ask to wield container if parent container is too small to insert items #79518
Ask to wield container if parent container is too small to insert items #79518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change.
The demo in the OP does not actually demo the change (there is no y/n prompt featured anywhere, you are already wielding the garbage bag at the start).
The only thing i'm concerned about (i didn't read too much into the code) is that we might get spammed with the "do you want to wield it?" prompts when doing regular looting (i.e. not deliberate i
>i
insertion).
Can you please check if that happens? I.e. give high priority to a garbage bag, put it into a small-ish pocket (which might also need a >0
priority? i forget), and try grabbing (via g
or perhaps AIM) a bunch of small items. The expectation is that they'd go to this new container first, but as it expands to the volume of the parent, new items would silently be inserted elsewhere and not prompt the player needlessly.
oops, I've uploaded the wrong file :) |
tested, it puts as many items in the garbage bag, then other containers, without asking to wield. |
good catch, updated, updated (165bc68): item::tname(123) seems to just use the plural version of the name
|
This is a big improvement! Thank you for implementing it |
Summary
Features "Ask to wield container if parent container is too small to insert items"
Purpose of change
It is quite annoying to try to insert items into a non-rigid container in your pocket, but it only inserts one because your pocket is too small. It would be handy to be able to wield the container first and then insert the items.
Describe the solution
In the insert activity actor, if the container could hold more items, but the parent cannot, query if you would like to wield the container first, then continue inserting.
Demo:
2025-02-04.08-34-42.mp4
Describe alternatives you've considered
Testing
searched where insert_item_activity_actor and unload_activity_actor is used and use those actions. They behaved as expected or never use that part of the code (check for space before inserting).
Additional context
Currently only works if the items would partially fit. To query if a single item is too large would require a bigger re-write.
Actions that use insert activity actor and are therefore have this feature:
AIM [u]nload
[I]nsert
Pour into container
AIM move stack/all
etc...
Actions that check for free space before inserting are not affected.