Skip to content

Commit

Permalink
Allow filling containers directly from blood draw kit (#3262)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt authored Sep 25, 2023
1 parent fbcaae3 commit 87a04bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4592,7 +4592,6 @@ int iuse::blood_draw( player *p, item *it, bool, const tripoint & )

if( acid_blood ) {
item acid( "acid", calendar::turn );
it->put_in( acid );
if( one_in( 3 ) ) {
if( it->inc_damage( DT_ACID ) ) {
p->add_msg_if_player( m_info, _( "…but acidic blood melts the %s, destroying it!" ),
Expand All @@ -4602,14 +4601,19 @@ int iuse::blood_draw( player *p, item *it, bool, const tripoint & )
}
p->add_msg_if_player( m_info, _( "…but acidic blood damages the %s!" ), it->tname() );
}
if( !liquid_handler::handle_liquid( acid, nullptr, 1, nullptr ) ) {
it->put_in( acid );
}
return it->type->charges_to_use();
}

if( !drew_blood ) {
return it->type->charges_to_use();
}

it->put_in( blood );
if( !liquid_handler::handle_liquid( blood, nullptr, 1, nullptr ) ) {
it->put_in( blood );
}
return it->type->charges_to_use();
}

Expand Down

0 comments on commit 87a04bc

Please sign in to comment.