fix(hud): simplify kill tracking - only count non-Shrapnel loot

- Shrapnel-only mobs undercounted, but no overcounting
- Better to undercount than overcount for profit analysis
- Removes complex Shrapnel heuristic
This commit is contained in:
LemonNexus 2026-02-08 23:52:33 +00:00
parent 31ead88886
commit b3d257a42d
1 changed files with 2 additions and 19 deletions

View File

@ -890,9 +890,6 @@ class MainWindow(QMainWindow):
self.set_session_state(SessionState.RUNNING)
self.current_session_id = project_id
# Reset shrapnel counter for kill tracking
self._shrapnel_count = 0
# Emit signal
self.session_started.emit(project_id)
@ -961,24 +958,10 @@ class MainWindow(QMainWindow):
if item_name == 'Universal Ammo':
return
# Kill tracking heuristic:
# - Non-Shrapnel loot = definite kill (reset Shrapnel counter)
# - Shrapnel: count as kill every 2 Shrapnel
# Kill tracking: Only count on non-Shrapnel loot
# Shrapnel-only mobs will be undercounted, but avoids overcounting
if item_name != 'Shrapnel':
# Real loot = 1 kill, and reset Shrapnel counter
# (The Shrapnel we collected belongs to this kill)
self.hud.update_stats({'kills_add': 1})
self._shrapnel_count = 0
else:
# Track Shrapnel count for this session
if not hasattr(self, '_shrapnel_count'):
self._shrapnel_count = 0
self._shrapnel_count += quantity
# Every 2 Shrapnel = 1 kill (approximate)
kills_from_shrapnel = self._shrapnel_count // 2
if kills_from_shrapnel > 0:
self.hud.update_stats({'kills_add': kills_from_shrapnel})
self._shrapnel_count -= kills_from_shrapnel * 2
# Queue database write for main thread (SQLite thread safety)
if self._current_db_session_id: