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

Pockets: soft nested containers respect priority settings #57700

Merged
merged 2 commits into from
May 28, 2022

Conversation

dseguin
Copy link
Member

@dseguin dseguin commented May 14, 2022

Summary

None

Purpose of change

#54941 made it so that items are never inserted into soft nested pockets. The rationale was that it doesn't improve volume management and only increases the retrieval cost of the item. The issue is that some containers have special properties despite being "soft", like the dimensional bag from Magiclysm.

Players should expect that manually setting pocket priority takes precedent over whether it's soft or not.

Describe the solution

Respect pocket priority settings when inserting items into containers.

Describe alternatives you've considered

Adding flags/fields to pocket data for specifying special priority behaviours.

Testing

Added a couple of test cases to verify that pocket priority is respected for any nested container:

tests/cata_test --rng-seed time "picking up items respects pocket autoinsert settings"

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. 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 May 14, 2022
@kevingranade kevingranade merged commit e1bfe27 into CleverRaven:master May 28, 2022
@dseguin dseguin deleted the fix_pocket_priority branch May 28, 2022 06:32
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. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
2 participants