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: putrid heart is now consumed after use #5493

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/avatar_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,9 @@ void use_item( avatar &you, item &used )
} else if( !used.is_container_empty() && is_pet_food( used.get_contained() ) ) {
unload_item( you, used );

} else if( !used.is_craft() && ( used.is_medication() || ( !used.type->has_use() &&
( used.is_food() ||
used.get_contained().is_food() ||
used.get_contained().is_medication() ) ) ) ) {
} else if( !used.is_craft() && ( used.is_medication() || used.is_food() ||
used.get_contained().is_food() ||
used.get_contained().is_medication() ) ) {
Comment on lines +601 to +603
Copy link
Member

@scarf005 scarf005 Oct 3, 2024

Choose a reason for hiding this comment

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

bit worried on implications on this, probably need to learn why it had !used.type->has_use() first

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like it's there to catch a case where an item can be either 'a'pplied or 'e'aten, and is meant to have a different effect depending on which one you do. I can't think of any items that would apply to, though. I tested this with the internal furnace CBM, and that's apparently handled elsewhere, because it still works normally.

Copy link
Member

Choose a reason for hiding this comment

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

Petfood is the only item I can recall that has different effects when applied vs eaten.

you.consume( used );

} else if( used.is_book() ) {
Expand Down
Loading