Skip to content

Commit d0324d9

Browse files
Energy remaining now looks for battery ammo_types
1 parent b107a90 commit d0324d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/item.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11504,7 +11504,7 @@ units::energy item::energy_remaining( const Character *carrier, bool ignoreExter
1150411504
if( is_magazine() ) {
1150511505
ret += energy;
1150611506
for( const item *e : contents.all_items_top( pocket_type::MAGAZINE ) ) {
11507-
if( e->typeId() == itype_battery ) {
11507+
if( e->ammo_type() == ammo_battery ) {
1150811508
ret += units::from_kilojoule( static_cast<std::int64_t>( e->charges ) );
1150911509
}
1151011510
}

0 commit comments

Comments
 (0)