Skip to content

Commit

Permalink
Fix Repair Nanobots (#3308)
Browse files Browse the repository at this point in the history
* Add back code that marks limbs for healing.

* style(autofix.ci): automated formatting

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
KheirFerrum and autofix-ci[bot] authored Sep 29, 2023
1 parent 25957dc commit 88924ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,12 @@ void Character::process_bionic( bionic &bio )
}
if( calendar::once_every( 2_minutes ) ) {
std::vector<bodypart_id> damaged_hp_parts;
for( const bodypart_id &bp : get_all_body_parts( true ) ) {
const int hp_cur = get_part_hp_cur( bp );
if( !is_limb_broken( bp ) && hp_cur < get_part_hp_max( bp ) ) {
damaged_hp_parts.push_back( bp );
}
}
if( !damaged_hp_parts.empty() ) {
// Essential parts are considered 10 HP lower than non-essential parts for the purpose of determining priority.
// I'd use the essential_value, but it's tied up in the heal_actor class of iuse_actor.
Expand Down

0 comments on commit 88924ca

Please sign in to comment.