fix(calc): correct PEC to PED conversion for cost/shot display
Cost per shot was showing PEC values labeled as PED (100x too high). Now properly converts PEC to PED by dividing by 100 before display. Before: 916.80 PEC displayed as 9.1680 PED (wrong) After: 916.80 PEC displayed as 0.0917 PED (correct)
This commit is contained in:
parent
bd6abd60c2
commit
09e07984a0
|
|
@ -1890,8 +1890,9 @@ class LoadoutManagerDialog(QDialog):
|
||||||
config = self._get_current_config()
|
config = self._get_current_config()
|
||||||
|
|
||||||
# Weapon metrics (per shot, not per hour)
|
# Weapon metrics (per shot, not per hour)
|
||||||
cost_per_shot = config.get_total_decay_per_shot() + config.get_total_ammo_per_shot()
|
cost_per_shot_pec = config.get_total_decay_per_shot() + config.get_total_ammo_per_shot()
|
||||||
self.cost_per_shot_label.setText(f"{cost_per_shot:.4f} PED")
|
cost_per_shot_ped = cost_per_shot_pec / Decimal("100") # Convert PEC to PED
|
||||||
|
self.cost_per_shot_label.setText(f"{cost_per_shot_ped:.4f} PED")
|
||||||
|
|
||||||
# DPS calculation
|
# DPS calculation
|
||||||
dps = config.calculate_dps()
|
dps = config.calculate_dps()
|
||||||
|
|
@ -1902,7 +1903,7 @@ class LoadoutManagerDialog(QDialog):
|
||||||
self.dpp_label.setText(f"{dpp:.4f}")
|
self.dpp_label.setText(f"{dpp:.4f}")
|
||||||
|
|
||||||
# Armor metrics (cost per hit)
|
# Armor metrics (cost per hit)
|
||||||
cost_per_hit = config.get_armor_decay_per_hit()
|
cost_per_hit = config.get_armor_decay_per_hit() # Already returns PED
|
||||||
self.cost_per_hit_label.setText(f"{cost_per_hit:.4f} PED")
|
self.cost_per_hit_label.setText(f"{cost_per_hit:.4f} PED")
|
||||||
|
|
||||||
# Protection summary
|
# Protection summary
|
||||||
|
|
@ -1914,7 +1915,7 @@ class LoadoutManagerDialog(QDialog):
|
||||||
self.protection_summary_label.setText(f"Total: {protection.get_total():.1f} | {prot_text}")
|
self.protection_summary_label.setText(f"Total: {protection.get_total():.1f} | {prot_text}")
|
||||||
|
|
||||||
# Healing metrics
|
# Healing metrics
|
||||||
cost_per_heal = config.get_heal_cost_per_use()
|
cost_per_heal = config.get_heal_cost_per_use() # Already returns PED
|
||||||
self.cost_per_heal_label.setText(f"{cost_per_heal:.4f} PED")
|
self.cost_per_heal_label.setText(f"{cost_per_heal:.4f} PED")
|
||||||
|
|
||||||
hp_per_pec = config.get_hp_per_pec()
|
hp_per_pec = config.get_hp_per_pec()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue