Skip to content

Commit

Permalink
Migrate more checks to Character::needs_food()
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Mar 30, 2024
1 parent 4977422 commit cfd5f08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/consumption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,7 @@ int Character::vitamin_mod( const vitamin_id &vit, int qty )

void Character::vitamins_mod( const std::map<vitamin_id, int> &vitamins )
{
const bool npc_no_food = is_npc() && get_option<bool>( "NO_NPC_FOOD" );
if( !npc_no_food ) {
if( needs_food() ) {
for( const std::pair<const vitamin_id, int> &vit : vitamins ) {
vitamin_mod( vit.first, vit.second );
}
Expand Down

0 comments on commit cfd5f08

Please sign in to comment.