Skip to content

Commit 4dc2e1e

Browse files
authored
Merge pull request #82563 from John-Candlebury/afs-fix-chromoelectric
Energy remaining now looks for battery ammo_types
2 parents f93e35d + d0324d9 commit 4dc2e1e

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
@@ -11520,7 +11520,7 @@ units::energy item::energy_remaining( const Character *carrier, bool ignoreExter
1152011520
if( is_magazine() ) {
1152111521
ret += energy;
1152211522
for( const item *e : contents.all_items_top( pocket_type::MAGAZINE ) ) {
11523-
if( e->typeId() == itype_battery ) {
11523+
if( e->ammo_type() == ammo_battery ) {
1152411524
ret += units::from_kilojoule( static_cast<std::int64_t>( e->charges ) );
1152511525
}
1152611526
}

0 commit comments

Comments
 (0)