Skip to content

Commit

Permalink
fix: make count-by-charges vehiclepart installable (#4367)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 authored Mar 19, 2024
1 parent ba73986 commit 255c444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vehicle_part.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ double vehicle_part::damage_percent() const
/** parts are considered broken at zero health */
bool vehicle_part::is_broken() const
{
return base->damage() >= base->max_damage();
return base->count_by_charges() ? false : base->damage() >= base->max_damage();
}

bool vehicle_part::is_unavailable( const bool carried ) const
Expand Down

0 comments on commit 255c444

Please sign in to comment.