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

Nesting big bag tests and fixes for disapearing items #60151

Merged
merged 3 commits into from
Aug 15, 2022

Conversation

bombasticSlacks
Copy link
Contributor

@bombasticSlacks bombasticSlacks commented Aug 14, 2022

Summary

None

Purpose of change

Potential fix for a bunch of issues I can't find related to disappearing items when using holsters.

Describe the solution

Basically when you had restrictions and rules on a pocket the nesting rules got a lil' wild with where they would try to put stuff. So sometimes stuff would end up being too large of volume for where it could go. This would usually be caught by best pocket when actually doing the insert but you would already be mid trying to insert so sometimes the item would be irreparably deleted.

I've added to the recursive call the ability to check the parents remaining volume so that if a pocket that you think "can" contain an item isn't rigid it'll check if it'll become too big to fit.

Describe alternatives you've considered

Testing

Added a unit test for this behavior. The basic case is:
Add a small worn bag to the character, insert into it a larger bag, add some sort of whitelist on the worn small bag, try to pick up something that would fit in the big bag but not the small bag. Before it would say you could then throw errors, now it will properly say that you cant.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. Items: Containers Things that hold other things json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 14, 2022
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` Code: Tests Measurement, self-control, statistics, balancing. 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