fix: use ammo_burn and range_val in loadout_manager_simple _set_weapon

- weapon.ammo -> weapon.ammo_burn
- weapon.range -> weapon.range_val
This commit is contained in:
LemonNexus 2026-02-09 22:23:37 +00:00
parent ab266e9da9
commit ff31c68a44
1 changed files with 2 additions and 2 deletions

View File

@ -365,12 +365,12 @@ class LoadoutManagerDialog(QDialog):
"""Set weapon and calculate cost."""
# Calculate cost per shot
decay_pec = Decimal(str(weapon.decay))
ammo = Decimal(str(weapon.ammo))
ammo = Decimal(str(weapon.ammo_burn))
cost_per_shot = (decay_pec / Decimal("100")) + (ammo * Decimal("0.0001"))
# Update UI
self.weapon_btn.setText(weapon.name[:30])
self.weapon_info.setText(f"Damage: {weapon.damage} | Range: {weapon.range}")
self.weapon_info.setText(f"Damage: {weapon.damage} | Range: {weapon.range_val}")
self.weapon_decay_label.setText(f"{decay_pec} PEC")
self.weapon_ammo_label.setText(f"{ammo}")
self.weapon_cost_label.setText(f"{cost_per_shot:.4f} PED")