-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
cans spawn sealed #41745
cans spawn sealed #41745
Conversation
Should we be adding or modifying a test for this, to ensure it never comes back? |
(Just learning the policies of this repository, so please excuse my question if wrong) |
It'd be great to have a test for this, if you're volunteering to write it :)! |
src/item_pocket.cpp
Outdated
@@ -596,7 +596,9 @@ bool item_pocket::seal() | |||
|
|||
void item_pocket::unseal() | |||
{ | |||
_sealed = false; | |||
if( _sealed ) { | |||
_sealed = false; |
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.
What's the point of this change? The behaviour seems the be exactly the same as before.
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.
i'm not exactly married to keeping it, but my logic was that it made setting breakpoints at that part much easier if you only want to find out when it actually matters that it sets it false
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.
Set a conditional breakpoint then.
@anothersimulacrum I'm gonna try and figure out how to write C++ so I can contribute here. Kind of daunting to jump into :p |
Summary
SUMMARY: None
No need to hit the 0.F changelog but this is a pretty significant bugfix for those who play experimental.
Purpose of change
Fixes #40127
Fixes #40658
Describe the solution
When the item is being modified in item_group.cpp, make sure to seal it when adding things to the CONTAINER pocket
Testing
wander around a town and look for aluminum cans of beer and small tin cans of cat food and mashed pumpkins
Additional context
Also, i left in the minor code changes i made to help me find the bug. they are minor organizational things but make it a lot easier to put breakpoints in.