Skip to content

Commit

Permalink
fix repair bionic consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmuolio committed Jul 12, 2021
1 parent bab395f commit 7ed85ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8958,7 +8958,7 @@ bool Character::consume_charges( item &used, int qty )
return true;
}

used.ammo_consume( qty, pos(), nullptr );
used.ammo_consume( qty, pos(), this );
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8030,7 +8030,7 @@ int item::ammo_consume( int qty, const tripoint &pos, Character *carrier )
// Consume bio pwr directly
if( carrier != nullptr && has_flag( flag_USES_BIONIC_POWER ) ) {
int bio_used = std::min( units::to_kilojoule( carrier->get_power_level() ), qty );
carrier->mod_power_level( units::from_kilojoule( bio_used ) );
carrier->mod_power_level( -units::from_kilojoule( bio_used ) );
qty -= bio_used;
}

Expand Down

0 comments on commit 7ed85ff

Please sign in to comment.