refactor: remove separate shrapnel display option

- Shrapnel is now integrated in the loot summary box (S: prefix)
- Remove show_shrapnel config option
- Remove shrapnel UI section from _setup_ui
- Remove shrapnel checkbox from settings dialog
- Update window size calculation
- Keep shrapnel data in HUDStats for internal tracking
This commit is contained in:
LemonNexus 2026-02-09 23:12:13 +00:00
parent e356b037ac
commit 61c45fac8b
1 changed files with 21 additions and 52 deletions

View File

@ -46,7 +46,7 @@ class HUDConfig:
show_combat_stats: bool = False # Kills, Globals, DPP show_combat_stats: bool = False # Kills, Globals, DPP
show_damage_stats: bool = False # Damage dealt/taken show_damage_stats: bool = False # Damage dealt/taken
show_cost_metrics: bool = True # Cost per shot/hit/heal show_cost_metrics: bool = True # Cost per shot/hit/heal
show_shrapnel: bool = False show_shrapnel: bool = False # Deprecated - now integrated in loot summary
show_gear_info: bool = True show_gear_info: bool = True
compact_mode: bool = False compact_mode: bool = False
@ -61,7 +61,6 @@ class HUDConfig:
'show_combat_stats': self.show_combat_stats, 'show_combat_stats': self.show_combat_stats,
'show_damage_stats': self.show_damage_stats, 'show_damage_stats': self.show_damage_stats,
'show_cost_metrics': self.show_cost_metrics, 'show_cost_metrics': self.show_cost_metrics,
'show_shrapnel': self.show_shrapnel,
'show_gear_info': self.show_gear_info, 'show_gear_info': self.show_gear_info,
'compact_mode': self.compact_mode, 'compact_mode': self.compact_mode,
} }
@ -77,7 +76,6 @@ class HUDConfig:
show_combat_stats=data.get('show_combat_stats', False), show_combat_stats=data.get('show_combat_stats', False),
show_damage_stats=data.get('show_damage_stats', False), show_damage_stats=data.get('show_damage_stats', False),
show_cost_metrics=data.get('show_cost_metrics', True), show_cost_metrics=data.get('show_cost_metrics', True),
show_shrapnel=data.get('show_shrapnel', False),
show_gear_info=data.get('show_gear_info', True), show_gear_info=data.get('show_gear_info', True),
compact_mode=data.get('compact_mode', False), compact_mode=data.get('compact_mode', False),
) )
@ -229,10 +227,6 @@ class HUDSettingsDialog(QDialog):
self.cb_damage.setChecked(self.config.show_damage_stats) self.cb_damage.setChecked(self.config.show_damage_stats)
form.addRow(self.cb_damage) form.addRow(self.cb_damage)
self.cb_shrapnel = QCheckBox("Shrapnel Amount")
self.cb_shrapnel.setChecked(self.config.show_shrapnel)
form.addRow(self.cb_shrapnel)
# Display mode # Display mode
form.addRow(QLabel("<b>Display Mode</b>")) form.addRow(QLabel("<b>Display Mode</b>"))
@ -267,7 +261,6 @@ class HUDSettingsDialog(QDialog):
self.config.show_cost_breakdown = self.cb_cost_breakdown.isChecked() self.config.show_cost_breakdown = self.cb_cost_breakdown.isChecked()
self.config.show_combat_stats = self.cb_combat.isChecked() self.config.show_combat_stats = self.cb_combat.isChecked()
self.config.show_damage_stats = self.cb_damage.isChecked() self.config.show_damage_stats = self.cb_damage.isChecked()
self.config.show_shrapnel = self.cb_shrapnel.isChecked()
self.config.compact_mode = self.cb_compact.isChecked() self.config.compact_mode = self.cb_compact.isChecked()
self.accept() self.accept()
@ -589,28 +582,6 @@ class HUDOverlay(QWidget):
sep_footer.setStyleSheet("background-color: rgba(255, 215, 0, 50);") sep_footer.setStyleSheet("background-color: rgba(255, 215, 0, 50);")
sep_footer.setFixedHeight(1) sep_footer.setFixedHeight(1)
layout.addWidget(sep_footer) layout.addWidget(sep_footer)
damage_layout.setContentsMargins(0, 0, 0, 0)
self.damage_dealt_label = QLabel("Dealt: 0")
self.damage_taken_label = QLabel("Taken: 0")
damage_layout.addWidget(self.damage_dealt_label)
damage_layout.addStretch()
damage_layout.addWidget(self.damage_taken_label)
layout.addWidget(damage_frame)
# === OPTIONAL: Shrapnel ===
if self.hud_config.show_shrapnel:
shrapnel_frame = QFrame()
shrapnel_layout = QHBoxLayout(shrapnel_frame)
shrapnel_layout.setContentsMargins(0, 0, 0, 0)
self.shrapnel_label = QLabel("💎 Shrapnel: 0.00 PED")
shrapnel_layout.addWidget(self.shrapnel_label)
shrapnel_layout.addStretch()
layout.addWidget(shrapnel_frame)
# === FOOTER: Session Time + Drag Hint === # === FOOTER: Session Time + Drag Hint ===
footer = QHBoxLayout() footer = QHBoxLayout()
@ -668,8 +639,6 @@ class HUDOverlay(QWidget):
height += 25 height += 25
if self.hud_config.show_damage_stats: if self.hud_config.show_damage_stats:
height += 25 height += 25
if self.hud_config.show_shrapnel:
height += 25
if self.hud_config.show_session_time: if self.hud_config.show_session_time:
height += 20 height += 20