diff --git a/src/item.cpp b/src/item.cpp index d4419897c17a0..e1ebb17ea939e 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -1655,13 +1655,15 @@ std::string item::info( std::vector &info, const iteminfo_query *parts info.push_back( iteminfo( "GUNMOD", string_format( _( "Ammo: %s" ), type->mod->ammo_modifier->name() ) ) ); } - if( mod.reload_modifier != 0 && parts->test( iteminfo_parts::GUNMOD_RELOAD ) ) { - info.emplace_back( "GUNMOD", _( "Reload modifier: " ), _( "%" ), - iteminfo::lower_is_better, mod.reload_modifier ); + if( mod.reload_modifier != 1 && parts->test( iteminfo_parts::GUNMOD_RELOAD ) ) { + info.emplace_back( "GUNMOD", _( "Reload modifier: " ), "", + iteminfo::no_newline | iteminfo::is_decimal | iteminfo::lower_is_better, + *mod.reload_modifier ); } - if( mod.min_str_required_mod > 0 && parts->test( iteminfo_parts::GUNMOD_STRENGTH ) ) { - info.push_back( iteminfo( "GUNMOD", _( "Minimum strength required modifier: " ), - mod.min_str_required_mod ) ); + if( mod.min_str_required_mod != 1 && parts->test( iteminfo_parts::GUNMOD_STRENGTH ) ) { + info.emplace_back( "GUNMOD", _( "Minimum strength required modifier: " ), "", + iteminfo::no_newline | iteminfo::is_decimal, + *mod.min_str_required_mod ); } if( !mod.add_mod.empty() && parts->test( iteminfo_parts::GUNMOD_ADD_MOD ) ) { insert_separation_line(); @@ -4568,7 +4570,7 @@ int item::get_reload_time() const int reload_time = is_gun() ? type->gun->reload_time : type->magazine->reload_time; for( const auto mod : gunmods() ) { - reload_time = static_cast( reload_time * ( 100 + mod->type->gunmod->reload_modifier ) / 100 ); + reload_time = static_cast( reload_time * mod->type->gunmod->reload_modifier ); } return reload_time; @@ -7927,7 +7929,7 @@ int item::get_min_str() const if( type->gun ) { int min_str = type->min_str; for( const auto mod : gunmods() ) { - min_str += mod->type->gunmod->min_str_required_mod; + static_cast(min_str *= mod->type->gunmod->min_str_required_mod); } return min_str > 0 ? min_str : 0; } else {