From 255c4443bc25df77b56392b20c16a13019c7b774 Mon Sep 17 00:00:00 2001 From: scarf Date: Tue, 19 Mar 2024 12:56:53 +0900 Subject: [PATCH] fix: make count-by-charges vehiclepart installable (#4367) --- src/vehicle_part.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle_part.cpp b/src/vehicle_part.cpp index f74053af12e0..8d73d7793b65 100644 --- a/src/vehicle_part.cpp +++ b/src/vehicle_part.cpp @@ -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