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
This commit is contained in:
parent
297552fd1c
commit
a349a85cbe
|
|
@ -1698,7 +1698,7 @@ class LoadoutManagerDialog(QDialog):
|
||||||
electric=matching_armor.protection_electric,
|
electric=matching_armor.protection_electric,
|
||||||
),
|
),
|
||||||
durability=matching_armor.durability,
|
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)
|
slot_widget.set_piece(piece)
|
||||||
pieces_found += 1
|
pieces_found += 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue