From a349a85cbe32818e320ce91503f6aff30e4478c6 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Mon, 9 Feb 2026 19:04:21 +0000 Subject: [PATCH] fix(ui): use Decimal for armor decay calculation to avoid type error - Fixed: Decimal * float is not supported - Now using Decimal for all operands in decay calculation --- ui/loadout_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/loadout_manager.py b/ui/loadout_manager.py index b188738..a5db499 100644 --- a/ui/loadout_manager.py +++ b/ui/loadout_manager.py @@ -1698,7 +1698,7 @@ class LoadoutManagerDialog(QDialog): electric=matching_armor.protection_electric, ), durability=matching_armor.durability, - decay_per_hp=Decimal("0.05") * (1 - matching_armor.durability / 100000) + decay_per_hp=Decimal("0.05") * (Decimal(1) - Decimal(matching_armor.durability) / Decimal("100000")) ) slot_widget.set_piece(piece) pieces_found += 1