fix(hud): reset Shrapnel counter on non-Shrapnel loot
- Non-Shrapnel loot = 1 kill AND reset Shrapnel counter - Prevents overcounting when mob drops Shrapnel + Oil - Shrapnel counted as 1 kill per 2 pieces
This commit is contained in:
parent
ff7b304c78
commit
31ead88886
|
|
@ -962,10 +962,13 @@ class MainWindow(QMainWindow):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Kill tracking heuristic:
|
# Kill tracking heuristic:
|
||||||
# - Non-Shrapnel loot = definite kill
|
# - Non-Shrapnel loot = definite kill (reset Shrapnel counter)
|
||||||
# - Shrapnel: count as kill every 2 Shrapnel (since mobs drop 1-2 Shrapnel)
|
# - Shrapnel: count as kill every 2 Shrapnel
|
||||||
if item_name != 'Shrapnel':
|
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.hud.update_stats({'kills_add': 1})
|
||||||
|
self._shrapnel_count = 0
|
||||||
else:
|
else:
|
||||||
# Track Shrapnel count for this session
|
# Track Shrapnel count for this session
|
||||||
if not hasattr(self, '_shrapnel_count'):
|
if not hasattr(self, '_shrapnel_count'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue