From 87a04bcc4a7233c554e8faa5f043e386f77d460a Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Mon, 25 Sep 2023 18:03:48 -0500 Subject: [PATCH] Allow filling containers directly from blood draw kit (#3262) --- src/iuse.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index a504a2d41b32..14f781d0b56e 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -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!" ), @@ -4602,6 +4601,9 @@ 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(); } @@ -4609,7 +4611,9 @@ int iuse::blood_draw( player *p, item *it, bool, const tripoint & ) 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(); }