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

Add overflow behavior to pillbox_used and pillbox_large_used #72617

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

tmqCypher
Copy link
Contributor

Summary

None

Purpose of change

Fixes overflowing pillboxes (mentioned in #72594)

Describe the solution

Set the overflow behavior of pillbox_used and pillbox_large_used to "discard" to keep them from raising errors.

Describe alternatives you've considered

Modifying pillbox_contents to not overflow pillboxes. The total possible volume of pillbox_contents isn't greater than the total capacity of a pillbox, so I suspect that the overflows are being caused by the contents not being ideally packed into each pocket, which I had not accounted for (for example, 2 10ml pockets can hold 2 1ml pills and 3 5ml pills, but only when both 1ml pills are placed in the same pocket). While it would be ideal to have a pillbox_contents who's least efficient possible packing doesn't overflow pillboxes in the first place, just adding an overflow behavior makes this much easier to maintain and much less likely to cause errors in the future.

Testing

Tested in-game using the itemgroup debug tool.

Additional context

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Spawn Creatures, items, vehicles, locations appearing on map <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 labels Mar 25, 2024
@kevingranade kevingranade merged commit 3461f3e into CleverRaven:master Mar 25, 2024
25 of 26 checks passed
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 26, 2024
@tmqCypher tmqCypher deleted the pillbox_overflow branch April 24, 2024 20:54
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) [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants