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

Provide insertion failure reasons from only eligible pockets #75304

Merged

Conversation

inogenous
Copy link
Contributor

Summary

Bugfixes "Provide insertion failure reasons from only eligible pockets"

Purpose of change

Display "not enough space" instead of "item is too short" when trying to insert items into a full backpack. Fixes #75302 .

Describe the solution

If the examined pocket does not satisfy pocket.can_contain() with ignore_contents=true, then the pocket wouldn't be eligible anyway, and we had better use the failure reason from another pocket that presumably would be eligible.

In effect, the failure reason when inserting "plastic painkiller bottle" into a full backpack will now instead be "not enough space".

Describe alternatives you've considered

Testing

snapshot7
snapshot8

Additional context

When trying to insert "plastic painkiller bottle" into a full backpack,
the failure reason was previously shown as "item is too short". This
commit instead makes the failure reason only show from pockets that
could possibly contain the item.

In effect, the failure reason when inserting "plastic painkiller bottle"
into a full backpack will now instead be "not enough space".
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Items: Containers Things that hold other things <Bugfix> This is a fix for a bug (or closes open issue) 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 Jul 28, 2024
@Maleclypse Maleclypse merged commit 6e69fb7 into CleverRaven:master Jul 29, 2024
28 checks passed
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` Items: Containers Things that hold other things json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"item is too short" when inserting into full backpack
2 participants