-
Notifications
You must be signed in to change notification settings - Fork 340
feat: reloading solids #6848
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
base: main
Are you sure you want to change the base?
feat: reloading solids #6848
Conversation
Co-Authored-By: Chaosvolt <[email protected]>
|
Note that I made slight progress on this, however it was through a hack. In item::reload() we can specify the |
fix solid reloading
Fix is_full checks some more
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.
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.
- Refilling a solid container from another container only fills it one unit at a time, unlike with reloading it with loose solids where it grabs the entire available stack.
- This can also still trigger the "solid contents show up on the menu twice" issue.
Trying to load an empty container with alread-contained solids always only loads one. Picking <container>, inventory likewise only loads one, while picking inside <item> (<container>) will grab all of it.



Purpose of change (The Why)
This PR reopens the work done by @chaosvolt in #4893. I am hoping by reopening this we can get more eyes on it as Chaos had a great deal of the work already done.
Describe the solution (The How)
Currently replaces a bunch of is_watertight_container() checks with is_container() and relevant logic statements where additional changes are needed.
Describe alternatives you've considered
Testing
The game seems to compile and I can successfully load a single protein ration or flour into a jar, however subsequent attempts seem to cause the debugmsg below. Note that when the player doesn't have a backpack, 99 flour tumbles to the floor. Unloading seems to work properly as of now.
Attempting to load a cardboard box with flour or protein rations however, causes the item to spit out the completed reload message, without actually reloading the item at all. I suspect this has to do with is_watertight_container() checks somewhere, but haven't been able to track it down yet.
Additional context
Note that Chaos seemed to report this as the error before: #4893 (comment). I belive this has been fixed as of his commit: 7366066 and that is where this PR begins from.
Resolves #563.
Checklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.mainso it won't cause conflict when updatingmainbranch later.