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

Fix Codeblocks compilation and contained food #15190

Merged

Conversation

Coolthulhu
Copy link
Contributor

Closes #15173
Closes #15182

I didn't check the compilation part because I don't have a set up codeblocks installation, but so far just adding the new files to the file always worked.

Added missing perishable coloration to contained food.
Added a special case for canned food, since it doesn't rot even though its perishable.

@macrosblackd
Copy link
Contributor

Could you add the consumption files to the src/CMakeLists.txt as well?

@chaosvolt
Copy link
Contributor

Any idea on what the cause of the container-coloration bug was? I'm not sure what obscure change could've caused it.

@@ -1870,9 +1871,11 @@ nc_color item::color_in_inventory() const
switch( rating ) {
case EDIBLE:
case TOO_FULL:
if( is_going_bad() ) {
if( preserves ) {
// Nothing, canned food won't rot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this prevent cans from showing perishable contents in their correct color?

If so, maybe we should add a new color for sealed perishables?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's acceptable for the color to not display if the container will prevent rot entirely. I've always disliked not being able to sort out my canned food from my genuine perishables at a glance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Canned food only really becomes perishable when removed from the can.
In most cases there is no good reason to un-can anything except during eating.
The old coloring was misleading - it hid the fact that cans prevent rot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which sounds like what I first assumed the bug was, I assumed it was a positive change before realizing that it also applied to containers that didn't preserve rot.

Then again, if we made cans need a can opener and made open cans no longer preserve food, I guess that technically would render it a moot point. XP

@Rivet-the-Zombie Rivet-the-Zombie self-assigned this Feb 3, 2016
Rivet-the-Zombie added a commit that referenced this pull request Feb 3, 2016
Fix Codeblocks compilation and contained food
@Rivet-the-Zombie Rivet-the-Zombie merged commit 946c094 into CleverRaven:master Feb 3, 2016
@Coolthulhu Coolthulhu deleted the consumption-fix branch February 23, 2016 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants