Commit Graph

208 Commits

Author SHA1 Message Date
LemonNexus c347b5d28e feat: major update - UI redesign, Session History, Gallery, Enhanced Loadout Manager
=== UI REDESIGN ===
- Rename Project Management to Activity History
- Add Setup Wizard for first-run configuration
- Reorganize layout: Activity Setup | Session Control | Recent Sessions
- Add prominent Loadout Manager button
- Add Activity Types (Hunting/Mining/Crafting)

=== SESSION HISTORY & GALLERY ===
- New SessionHistoryDialog (Ctrl+H) - view/export past sessions
- New GalleryDialog (Ctrl+G) - browse screenshots
- Auto-screenshot on globals and HoFs
- Screenshots saved to data/screenshots/

=== ENHANCED LOADOUT MANAGER ===
- Add Weapon Amplifier support
- Add Armor Plating support
- Add Mindforce Implant support
- New AmplifierSelector dialog
- Full cost calculations for all gear types

=== NEW FILES ===
- ui/setup_wizard.py
- ui/session_history.py
- ui/gallery_dialog.py
- ui/amplifier_selector.py
- docs/CODEBASE_AUDIT_REPORT.md

=== MODIFIED FILES ===
- ui/main_window.py - major restructuring
- ui/loadout_manager_simple.py - enhanced gear support
- gui_main.py - first-run wizard check
2026-02-11 10:23:21 +00:00
LemonNexus c93b57aec4 fix: count weapon cost when target evades/dodges your attack
- Check evade type for 'target Evaded' or 'target Dodged'
- Count weapon cost on those events (you fired but missed)
- Armor decay still only counted on actual damage taken
- Fixes: weapon cost now accurate for all shots including misses
2026-02-11 09:52:11 +00:00
LemonNexus 48bd83dade fix: adjust armor decay formula to ~0.025 PEC per damage
- Changed from 0.0005 to 0.00025 PED per damage (0.025 PEC)
- Based on user feedback: 504 damage should give ~0.14 PED decay
- Removed complex fallback logic, using simple accurate formula
- Formula: damage * 0.00025 = armor decay in PED
2026-02-11 09:44:52 +00:00
LemonNexus 6e425f2c06 fix: move _load_settings() after setup_ui() to fix AttributeError
- 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
2026-02-11 09:15:57 +00:00
LemonNexus 5837333d69 feat: add persistent settings for avatar name
- 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
2026-02-11 09:08:04 +00:00
LemonNexus a216afde2d fix: calculate armor decay based on actual damage absorbed
- 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
2026-02-10 15:29:50 +00:00
LemonNexus 6d8f710244 fix: add comma to loot regex patterns for items like 'Dominax Original Garter, Adjusted (L)'
- Add comma (,) to character class in PATTERN_LOOT_EN and PATTERN_LOOT_SV
- Add comma (,) to PATTERN_LOOT_NO_VALUE_EN and PATTERN_LOOT_NO_VALUE_SV
- Fixes items with commas in their names not being tracked
2026-02-10 15:13:21 +00:00
LemonNexus e4fd75e2a7 fix: save HUD costs to database on session end
- 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
2026-02-10 14:52:32 +00:00
LemonNexus 6d99d357ab fix: pause/resume now stops HUD tracking
- 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
2026-02-10 14:49:31 +00:00
LemonNexus fe0858ebfa fix: correct kill counting logic
- 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
2026-02-10 14:37:46 +00:00
LemonNexus 4db34c2c2c fix: use batched timer-based refresh instead of signals
- Replace signal/slot approach with QTimer-based batched updates
- Add _refresh_pending flag and _request_refresh() method
- Refresh timer runs at 10Hz (100ms) on main thread
- Prevents race conditions and thread safety issues
- All update methods now just set the pending flag
2026-02-10 14:31:45 +00:00
LemonNexus bd40d3d5e0 fix: remove dynamic setStyleSheet calls to prevent parsing errors
- Remove dynamic color changes from _refresh_display
- Use fixed colors set during widget creation
- Just update text values in _refresh_display
- Prevents 'Could not parse stylesheet' errors
2026-02-10 14:29:42 +00:00
LemonNexus 63f215a3a1 fix: use signal/slot for thread-safe GUI updates
- Add refresh_needed signal to HUDOverlay
- Connect signal to _refresh_display with QueuedConnection
- Update all update methods to emit signal instead of calling _refresh_display directly
- This ensures all GUI operations (setStyleSheet, setText) happen on main thread
- Fixes crash caused by GUI operations from LogWatcher thread
2026-02-10 14:27:33 +00:00
LemonNexus 0a6e4358de fix: wrap setStyleSheet in try/except to prevent stylesheet crash
- Add inner try/except around setStyleSheet calls
- Catch and ignore stylesheet parsing errors
- Prevents 'Could not parse stylesheet' crash
2026-02-10 14:22:38 +00:00
LemonNexus b14888dc97 feat: add total skill gained tracking to HUD
- Add show_skills config option to HUDConfig
- Add total_skill_gained and skill_gains fields to HUDStats
- Add skills display section in HUD UI (purple box)
- Add update_skill() method to track skill gains
- Update on_skill handler in main_window.py to call update_skill()
- Add skills checkbox to HUD settings dialog
- Fix duplicate code in _refresh_display method
- Update to_dict/from_dict for skills config persistence
2026-02-10 14:19:56 +00:00
LemonNexus ecf27a504c fix: add missing logger import at top of main_window.py
- Import logging module
- Create logger instance for use in event handlers
- Fixes 'name logger is not defined' errors
2026-02-10 14:15:44 +00:00
LemonNexus 818d0f98f3 fix: add missing _session_costs initialization and verbose debug logging
- 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
2026-02-10 14:11:05 +00:00
LemonNexus b8bd462d09 fix: add error handling to prevent stylesheet crash in _refresh_display
- Wrap entire _refresh_display in try/except
- Check widget exists before setting stylesheet
- Log errors instead of crashing
2026-02-10 14:02:29 +00:00
LemonNexus e17f7e3565 fix: properly wire cost tracking and loot tracking to new HUD
- 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
2026-02-10 13:57:41 +00:00
LemonNexus c0cb42cd54 fix: use new clean HUD overlay (hud_overlay_clean.py)
- Change import from hud_overlay to hud_overlay_clean
- New HUD has better layout, customizable sections, Cost/Loot/Highest display
2026-02-10 13:51:13 +00:00
LemonNexus 303bb3b538 fix: remove calls to non-existent methods and add error handling
- 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
2026-02-10 13:50:24 +00:00
LemonNexus 90595a8ebe feat: add player name setting for accurate global tracking
- 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
2026-02-10 13:40:42 +00:00
LemonNexus 3473b2c592 fix: add missing healing_done field to HUDStats
- Add healing_done: Decimal field to track HP healed
- Add to to_dict() for serialization
- Fixes AttributeError in on_heal_event handler
2026-02-10 13:35:16 +00:00
LemonNexus 675bf981db fix: resolve type errors and global counting issues in HUD event handlers
- 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
2026-02-10 13:29:05 +00:00
LemonNexus b3f4045aed fix: add missing LogWatcher event handlers to HUD
- on_global(): Handle global events
- on_hof(): Handle HoF events
- on_damage_dealt(): Handle damage dealt
- on_damage_taken(): Handle damage taken
- update_stats(): Legacy stats update compatibility
2026-02-10 13:23:46 +00:00
LemonNexus 050ddedc4e docs: add complete feature summary for tomorrow's testing session
- COMPLETE_FEATURE_SUMMARY.md with all features documented
- Testing checklist organized by priority
- Quick start commands
- Future roadmap
- Achievement summary: 7 new modules, 25k+ lines of code
2026-02-09 23:52:31 +00:00
LemonNexus 7c7922a508 feat: implement icon extraction, market prices, and GUI dialogs
- icon_manager.py: Download item icons from EntropiaWiki with caching
- market_prices.py: Manual price tracking and profit calculators
- icon_price_dialogs.py: GUI for browsing icons and managing prices
- FEATURE_RESEARCH.md: Comprehensive feature research document
- Multiple icon sizes (32x32, 64x64, 128x128)
- Batch export to PNG
- Profit calculation with markup for hunting/crafting
- Price database with import/export
2026-02-09 23:51:15 +00:00
LemonNexus 082a71f87d docs: add comprehensive development summary and roadmap
- DEVELOPMENT_SUMMARY.md with complete feature overview
- Phase 1-4 integration plans
- Testing checklist for tomorrow's session
- Future ideas and design philosophy
2026-02-09 23:30:13 +00:00
LemonNexus ca9b4fb862 feat: add 4 new modules for enhanced gameplay tracking
- loot_analyzer.py: Detailed loot analysis by mob/item category, DPS/DPP tracking, global alerts
- crafting_tracker.py: Blueprint success rates, QR progression, material tracking
- game_vision.py: Computer vision for detecting equipped gear and target mobs
- notifications.py: Discord/Telegram alerts for globals, HoFs, session summaries
- auto_screenshot.py: Automatic screenshot capture on important events

All modules ready for integration with main application
2026-02-09 23:29:15 +00:00
LemonNexus 61c45fac8b 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
2026-02-09 23:12:13 +00:00
LemonNexus e356b037ac style: add dividers and styled boxes to HUD sections
- Add horizontal line separator after header
- Add styled boxes with borders for: gear, P/L, cost metrics, cost breakdown, combat, damage
- Add separators between major sections
- Footer separator before time/drag hint
- Each section has distinct background color and border
2026-02-09 23:09:52 +00:00
LemonNexus ab89b3350f style: remove all emojis from HUD, use text labels instead
- Change 🏆 Best: to Highest:
- Replace gear emojis with W:/A:/L: prefixes
- Replace 💎 with S: (Shrapnel)
- Replace 📦 with R: (Regular)
- Change settings button from ⚙️ to ... with border styling
- Clean, minimal text-based UI ready for custom icons later
2026-02-09 23:07:26 +00:00
LemonNexus e5c6878c6a fix: track highest loot per-kill (sum of all items from one mob)
- Use time-based grouping: loot within 2 seconds = same kill
- Sum all items from a kill to calculate total loot value
- Update highest_loot when a kill is complete (gap > 2 sec)
- Initialize kill tracking fields on session start
- Check final kill on session stop
2026-02-09 23:05:05 +00:00
LemonNexus ad3003b808 feat: add highest single loot tracking to HUD
- Add highest_loot field to HUDStats
- Display 🏆 Best: X.XX in loot summary section
- Track highest loot value in update_loot()
- Add to to_dict for persistence
- Gold color with trophy emoji for visibility
2026-02-09 23:03:16 +00:00
LemonNexus 6204b82c88 feat: detailed loot breakdown in HUD (Total, Shrapnel, Regular)
- Add loot_other field to HUDStats for non-shrapnel loot
- Loot summary now shows: Total | 💎 Shrapnel | 📦 Regular
- Each type with distinct color coding
- update_loot() now accepts is_shrapnel parameter
- Remove duplicate shrapnel UI section (now integrated in summary)
- Update window height for two-row summary
2026-02-09 22:59:16 +00:00
LemonNexus 64a68f3857 fix: add logger import and safe widget access for HUD rebuild
- Add logging import and logger instance
- Add _safe_set_text() helper to handle deleted widgets gracefully
- Use safe access in _refresh_display to prevent RuntimeError on rebuild
- Wrap stylesheet updates in try/except for safety
2026-02-09 22:55:22 +00:00
LemonNexus 7a55e3b246 feat: show both Cost and Loot together in summary row
- Change total cost display to show both Cost (red) and Loot (green) side by side
- Styled with background highlight for visibility
- Settings checkbox renamed to 'Cost & Loot Summary'
- Both values show PED amount
2026-02-09 22:53:42 +00:00
LemonNexus 61d2ad2019 fix: add missing UI elements for damage stats and shrapnel
- Add damage_dealt and damage_taken to HUDStats
- Add shrapnel_total to HUDStats
- Add UI elements for damage stats in _setup_ui
- Add UI element for shrapnel in _setup_ui
- Update window size calculation for new elements
- Update _refresh_display to show damage and shrapnel
- Add update_damage() and update_shrapnel() public methods
2026-02-09 22:52:33 +00:00
LemonNexus 5c4ce8f307 feat: add total cost display to HUD
- Add show_total_cost config option (enabled by default)
- Add total cost row between P/L and cost metrics
- Add Total Cost checkbox to settings dialog
- Update window size calculation for total cost row
- Update _refresh_display to show total cost
2026-02-09 22:49:10 +00:00
LemonNexus 4c084bd0cd fix: HUD rebuild stability and end_session compatibility
- Add end_session() as alias for stop_session() for backward compatibility
- Use delayed rebuild with QTimer.singleShot to avoid UI glitches
- Add container.show() at end of _setup_ui to ensure visibility
- Add error handling in _do_rebuild for recovery
2026-02-09 22:45:14 +00:00
LemonNexus f9b4d9a44b fix: add missing weapon_dpp and weapon_cost_per_hour parameters to start_session
- Added for backward compatibility with main_window.py
- These parameters are accepted but not used in the clean HUD
- Fixes TypeError when starting session
2026-02-09 22:41:49 +00:00
LemonNexus cd5f03c002 fix: HUD overlay initialization order and rebuild logic
- Create container before calling _update_window_size in _setup_ui
- Fix _rebuild_ui to delete and recreate container properly
- Add VISION_PLAN.md with comprehensive computer vision/OCR plan
2026-02-09 22:38:49 +00:00
LemonNexus 60fbf8d257 feat: new clean customizable HUD overlay
- hud_overlay_clean.py: Completely redesigned HUD
- Default view shows only essentials (P/L, Return %, Cost metrics, Gear)
- Optional stats hidden by default (cost breakdown, combat, damage)
- Settings button (⚙️) to customize visible elements
- Compact mode option
- Auto-sizing based on enabled features
- HUD_REDESIGN.md: Documentation and migration guide
2026-02-09 22:34:16 +00:00
LemonNexus 2959bfff89 fix: use loadout's cost_per_hit instead of armor decay tracker lookup
- Disable ArmorDecayTracker (it requires armor to be in hardcoded database)
- Use cost_per_hit from loadout directly when damage is taken
- This allows any armor to work, not just ones in the database
- Simplified approach: pre-calculate costs in loadout, use during session
2026-02-09 22:29:05 +00:00
LemonNexus 6cc10b14f1 fix: HUD drag functionality - auto-manage click-through mode
- Don't enable click-through on show (allows initial interaction)
- Disable click-through when mouse enters HUD (allows clicking/dragging)
- Enable click-through when mouse leaves (so HUD doesn't block game)
- Remove duplicate leaveEvent handler
- User can now hold Ctrl and drag without issues
2026-02-09 22:27:33 +00:00
LemonNexus ff31c68a44 fix: use ammo_burn and range_val in loadout_manager_simple _set_weapon
- weapon.ammo -> weapon.ammo_burn
- weapon.range -> weapon.range_val
2026-02-09 22:23:37 +00:00
LemonNexus ab266e9da9 fix: remove duplicate old code in weapon_selector _on_select
- Remove duplicate code block that used 'ammo' instead of 'ammo_burn'
- The old code was left behind after adding try/except wrapper
2026-02-09 22:21:23 +00:00
LemonNexus 32a858a3f5 fix: add safe_decimal/safe_int helpers to handle null API values
- Add safe_decimal() and safe_int() helper functions at module level
- Update NexusWeapon.from_api to use safe_decimal for all fields
- Update NexusArmor.from_api to use safe_decimal/safe_int
- Update NexusPlate.from_api to use safe_decimal
- Update NexusEnhancer.from_api to use safe_decimal/safe_int
- Remove duplicate safe_decimal definition
- This fixes decimal.ConversionSyntax errors from null/invalid API values
2026-02-09 22:12:36 +00:00
LemonNexus 3ae25503d6 fix: comprehensive null/invalid value handling in weapon selector
- Add detailed logging for skipped weapons
- Handle 'null', 'None', empty strings in decay/ammo values
- Safe Decimal conversion with try/except blocks
- Safe tooltip formatting for all weapon fields
- Safe preview update with error handling
2026-02-09 22:06:31 +00:00
LemonNexus f6ec57d2a2 fix: better error logging and validation in weapon selector
- Add debug logging for skipped weapons
- Handle empty strings and 'null' values
- Verify all files use correct API attribute names
2026-02-09 22:01:02 +00:00