Skip to content

Commit

Permalink
feat(UI): show ammo per shot for weapons that use it (#6013)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt authored Jan 30, 2025
1 parent e38857b commit 496df8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2515,6 +2515,11 @@ void item::gun_info( const item *mod, std::vector<iteminfo> &info, const iteminf
mod->ammo_data()->nname( mod->ammo_remaining() ) ) );
}

if( mod->ammo_required() > 1 ) {
info.emplace_back( "AMMO", string_format( "Uses <stat>%i</stat> ammo per shot",
mod->ammo_required() ) );
}

if( mod->get_gun_ups_drain() && parts->test( iteminfo_parts::AMMO_UPSCOST ) ) {
info.emplace_back( "AMMO",
string_format( vgettext( "Uses <stat>%i</stat> charge of UPS per shot",
Expand Down

0 comments on commit 496df8f

Please sign in to comment.