From ff98b76334dcf2b1f680c8f0e2ee7ec660f7618c Mon Sep 17 00:00:00 2001 From: Fris0uman Date: Fri, 27 Sep 2019 18:49:29 +0200 Subject: [PATCH] fix fuel storage --- src/consumption.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/consumption.cpp b/src/consumption.cpp index c37526fcf2e00..4c2c0e2be72eb 100644 --- a/src/consumption.cpp +++ b/src/consumption.cpp @@ -1325,10 +1325,10 @@ bool player::fuel_bionic_with( item &it ) const int loadable = std::min( it.charges, get_fuel_capacity( it.typeId() ) ); - const std::string loaded_charge = std::to_string( loadable ); + const std::string new_charge = std::to_string( loadable + std::stoi( get_value( it.typeId() ) ) ); it.charges -= loadable; - set_value( it.typeId(), loaded_charge );// type and amount of fuel + set_value( it.typeId(), new_charge );// type and amount of fuel update_fuel_storage( it.typeId() ); add_msg_player_or_npc( m_info, //~ %1$i: charge number, %2$s: item name, %3$s: bionics name