- log_info() needs log_output which is created in setup_ui()
- Move _load_settings() call to after UI initialization
- Fixes 'MainWindow' object has no attribute 'log_output' error
- Add QSettings import from PyQt6.QtCore
- Add _load_settings() method to load player name on startup
- Add _save_settings() method to save player name when settings change
- Settings stored in Lemontropia/Suite registry/file
- Player name now persists between app launches
- Use formula: Decay (PED) = damage * 0.0005 (approx 0.05 PEC per damage)
- This matches EU armor decay formula better than flat cost per hit
- 1966 damage would give ~0.98 PED decay (not 22 PED)
- Falls back to cost_per_hit if armor stats not available
- Save weapon_cost_total, armor_cost_total, healing_cost_total to decay_events
- This ensures core profit calculation matches HUD display
- Insert decay events before calling end_session
- Log the saved costs for verification
- Set hud.session_active = False when paused
- Set hud.session_active = True when resumed
- Update HUD status label to show paused state (orange)
- Prevents loot/costs from being tracked during breaks
- Remove separate update_kills() call from on_loot handler
- Let update_loot() handle kill counting internally
- Only increment kills when >2 second gap since last loot
- Add is_new_kill flag to track new mobs vs multi-item drops
- Add debug logging for kill counting
- Initialize _session_costs and _session_display in __init__ (was causing crashes)
- Add [EVENT], [HUD], [DEBUG], [ERROR] prefix logging to all event handlers
- Add traceback logging for better debugging
- Add debug logging to all HUD update methods
- Log session_active state in HUD methods
- Add weapon cost tracking on damage_dealt using session_costs
- Add armor cost tracking on damage_taken using session_costs
- Fix on_loot to use update_kills() and update_loot() with proper params
- Fix on_heal to use update_healing_cost() and on_heal_event() with proper params
- All cost tracking now uses _session_costs from loadout selection
- Remove update_cost calls (method doesn't exist in new HUD)
- Remove update_stats with shots_add (not implemented)
- Add try/except to all event handlers to prevent crashes
- Simplify damage tracking to just update_damage methods
- Settings dialog now has Avatar Name field
- Store player_name in MainWindow
- Filter personal globals to only count if player name matches
- Warn user if no player name is configured
- Log other players' globals separately
- Fix float/Decimal type errors in damage event handlers
- Fix global counter counting other players' globals
- on_personal_global() only counts your globals, not on_global()
- on_global() now only logs but doesn't increment counter
- Add on_loot_event() and on_heal_event() handlers
- Convert damage values to Decimal in main_window callbacks
- New LoadoutManagerSimple with clean cost-focused design
- LoadoutConfig now stores only: cost_per_shot/hit/heal + display names
- Legacy format support for backward compatibility
- Simplified LoadoutSelectionDialog with clear cost preview
- Updated MainWindow to use new simplified structure
- Removed 3 overlapping armor systems, replaced with single decay value
- JSON serialization is now simple and reliable
Key principle: Only store what's needed for cost tracking.
- _get_current_config now includes new armor fields
- to_dict properly serializes current_armor_decay as string
- from_dict properly deserializes new armor fields
- _set_config restores new armor fields when loading
- Armor decay now flows from LoadoutManager to session
- Updated loadout_selected signal to emit dict with full loadout info
- _on_loadout_selected_for_session now extracts weapon/armor/healing names
- HUD now shows gear names from selected loadout
- Cost tracker skipped for JSON-based loadouts (need DB save first)
- start_session now uses _session_loadout_name for HUD display
- Added _setup_session_cost_tracker to initialize SessionCostTracker
- Added _on_cost_update callback to update HUD with live costs
- Loadout name now appears in HUD instead of 'Default'
- Modified on_start_session to show LoadoutSelectionDialog first
- Added _on_loadout_selected_for_session callback
- User can now select a loadout or skip before session starts
- Selected loadout info is logged and stored for session
- Non-Shrapnel loot = definite kill
- Shrapnel: every 2 Shrapnel = 1 kill (since mobs drop 1-2 Shrapnel)
- This handles mobs that drop only Shrapnel
- Reset Shrapnel counter on session start
- Add shots_fired counter to HUDStats
- Display SHOTS in HUD next to DAMAGE DEALT/TAKEN
- Track 1 shot per damage event
- Fix kills: count when non-Shrapnel loot is received
- Shrapnel excluded from kill count (every mob drops it)
- Use actual weapon decay (PEC) from API instead of broken DPP calculation
- Add decay and ammo_burn to weapon stats passed from Gear Selector
- Cost per shot = decay (in PEC) / 100 = PED
- HUD now shows: LOOT, COST, and PROFIT/LOSS (P/L)
- Profit/Loss color-coded: Green=profit, Red=loss, White=break-even
- Cost estimated from weapon DPP and damage dealt
- Weapon stats (DPP, cost/hour) passed when starting session
- Tracks cost per shot based on damage output
- All stats persisted in HUDStats dataclass
- Remove auto-kill counting on loot (was overcounting)
- Add GearSelectorDialog to select weapons/armor/tools from Nexus API
- Add Tools → Select Gear menu (Ctrl+G)
- Selected weapon now shows in HUD during session
- Uses mock data from nexus_api.py for now
- LogWatcher callbacks now queue events instead of direct DB access
- Main thread processes queue every 100ms
- Fixes 'SQLite objects created in a thread can only be used in that same thread' error
- Loot will now be properly recorded to database
- log_debug/info/warning/error now use _append_log directly
- Avoids AttributeError when log_watcher is None during init
- LogWatcher is only used for game events, not UI logging
- main_window: Actually call hud.start_session() to reset stats and start timer
- hud_overlay: Add SetWindowPos refresh after WinAPI style changes
- This fixes stats not resetting and drag not working on Windows