EU-Utility/core
devmatrix 5e44355e52 chore: prepare for premium architecture transformation 2026-02-16 21:42:53 +00:00
..
api fix: Syntax error in external_api.py - unterminated triple-quoted string 2026-02-15 18:19:13 +00:00
data feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
modern_ui Auto-sync: 2026-02-16 21:15 2026-02-16 21:15:16 +00:00
ui fix: Add 'Open' button to plugins list so plugins can be opened 2026-02-16 01:04:07 +00:00
widgets fix: Add missing QPixmap and Qt imports in tray_icon.py 2026-02-15 23:43:06 +00:00
README.md feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
__init__.py fix: Update __init__.py to import from consolidated activity_bar 2026-02-16 20:59:58 +00:00
activity_bar.py refactor: Consolidate activity_bar - replace with enhanced version 2026-02-16 20:59:51 +00:00
audio.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
backup.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
base_plugin.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
classy_dashboard.py feat: Classy Dashboard UI with modern glassmorphism design 2026-02-15 18:34:49 +00:00
clipboard.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
dashboard.py fix: Remove redundant Settings plugin and baked-in Spotify widget 2026-02-14 19:58:18 +00:00
dashboard_enhanced.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
data_store.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
debug_logger.py feat: Add comprehensive debug logging for performance diagnosis 2026-02-15 23:59:00 +00:00
dependency_helper.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
eu_styles.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
event_bus.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
floating_icon.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
game_overlay_integration.py feat: Game Overlay Integration - Process-based detection + window attachment 2026-02-16 00:58:26 +00:00
hotkey_manager.py feat: Fix system tray and add configurable hotkeys 2026-02-14 19:17:42 +00:00
http_client.py fix: Fix HTTPClient, Dashboard, and Log Parser errors 2026-02-14 23:40:09 +00:00
icon_extractor.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
icon_helper.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
icon_manager.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_reader.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_reader_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_watcher_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
logger.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
main.py feat: Game Overlay Integration - Process-based detection + window attachment 2026-02-16 00:58:26 +00:00
main_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
memory_leak_detector.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
nexus_api.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
notifications.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ocr_backend_manager.py fix: Fix invalid escape sequence warning in ocr_backend_manager.py 2026-02-14 23:52:05 +00:00
ocr_service.py feat: Constrain skill scanner to only Entropia game window 2026-02-15 00:55:37 +00:00
ocr_service_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ocr_service_optimized_v2.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
overlay_controller.py chore: prepare for premium architecture transformation 2026-02-16 21:42:53 +00:00
overlay_widgets.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
overlay_window.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
perfect_ux.py fix: Add 'Open' button to plugins list so plugins can be opened 2026-02-16 01:04:07 +00:00
performance_optimizations.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
plugin_api.py fix: Maintain backward compatibility for core.plugin_api imports 2026-02-15 18:07:19 +00:00
plugin_dependency_manager.py feat: Add plugin-to-plugin dependencies support 2026-02-14 23:49:13 +00:00
plugin_manager.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
plugin_manager_optimized.py fix: Move base_plugin.py to core module and update imports 2026-02-15 02:44:50 +00:00
plugin_store.py fix: Improve Plugin Store layout - larger cards and proper sizing 2026-02-16 00:53:24 +00:00
plugin_ui_components.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
screenshot.py fix: Fix initialization order bug in ScreenshotService 2026-02-14 18:50:45 +00:00
security_utils.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
settings.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
settings_secure.py fix: Disable Spotify widget by default 2026-02-15 00:14:35 +00:00
startup_profiler.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
tasks.py fix: TaskManager accepts max_workers argument in __new__ 2026-02-16 00:46:28 +00:00
theme_manager.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
tray_icon.py feat: Change Ctrl+Shift+U to toggle in-game overlay (Activity Bar) 2026-02-16 00:38:13 +00:00
ui_optimizations.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ui_render_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
updater.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
widget_registry.py feat: Widget Registry - plugins register widgets dynamically 2026-02-15 16:16:07 +00:00
widget_system.py cleanup: Remove ClockWidget and SystemMonitorWidget from core 2026-02-15 16:18:02 +00:00
window_manager.py fix: Update window detection to find actual game client, not launcher 2026-02-16 00:49:06 +00:00

README.md

EU-Utility Core Module

The core/ module contains the foundational functionality for EU-Utility, providing plugin management, API services, UI components, and utility functions.

Module Structure

core/
├── __init__.py                 # Package exports and version info
├── base_plugin.py              # BasePlugin abstract class
├── event_bus.py                # Typed event system
├── settings.py                 # Configuration management
├── plugin_api.py               # Backward compatibility wrapper
├── plugin_manager.py           # Plugin lifecycle management
│
├── api/                        # Three-tier API system
│   ├── __init__.py
│   ├── plugin_api.py           # PluginAPI - core services access
│   ├── widget_api.py           # WidgetAPI - overlay widgets
│   └── external_api.py         # ExternalAPI - third-party integrations
│
├── ui/                         # UI components
│   ├── __init__.py
│   ├── dashboard_view.py
│   ├── settings_view.py
│   └── search_view.py
│
└── utils/                      # Utility modules (to be created)
    ├── __init__.py
    ├── eu_styles.py            # Styling system
    ├── security_utils.py       # Security utilities
    └── helpers.py              # Common helpers

Key Components

1. BasePlugin (base_plugin.py)

Abstract base class that all plugins must inherit from.

from core.base_plugin import BasePlugin
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QLabel

class MyPlugin(BasePlugin):
    name = "My Plugin"
    version = "1.0.0"
    author = "Your Name"
    description = "What my plugin does"
    hotkey = "ctrl+shift+y"
    
    def initialize(self) -> None:
        self.log_info("My Plugin initialized!")
    
    def get_ui(self) -> QWidget:
        widget = QWidget()
        layout = QVBoxLayout(widget)
        layout.addWidget(QLabel("Hello from My Plugin!"))
        return widget

2. EventBus (event_bus.py)

Typed event system for plugin communication.

from core.event_bus import get_event_bus, LootEvent, DamageEvent

bus = get_event_bus()

# Subscribe to events
sub_id = bus.subscribe_typed(
    LootEvent,
    handle_loot,
    mob_types=["Atrox", "Daikiba"]
)

# Publish events
bus.publish(LootEvent(
    mob_name="Atrox",
    items=[{"name": "Animal Oil", "value": 0.05}],
    total_tt_value=0.05
))

Available event types:

  • SkillGainEvent - Skill increases
  • LootEvent - Loot received
  • DamageEvent - Combat damage
  • GlobalEvent - Global announcements
  • ChatEvent - Chat messages
  • EconomyEvent - Economic transactions
  • SystemEvent - System notifications

3. Settings (settings.py)

Configuration management with automatic persistence.

from core.settings import get_settings

settings = get_settings()

# Get/set values
theme = settings.get('overlay_theme', 'dark')
settings.set('overlay_theme', 'light')

# Plugin management
if settings.is_plugin_enabled('my_plugin'):
    settings.enable_plugin('my_plugin')

4. PluginAPI (api/plugin_api.py)

Primary API for accessing core services.

from core.api import get_api

api = get_api()

# Log reading
lines = api.read_log_lines(100)

# Window info
window = api.get_eu_window()

# OCR
text = api.recognize_text(region=(100, 100, 200, 50))

# Notifications
api.show_notification("Title", "Message")

# Data storage
api.set_data("key", value)
value = api.get_data("key", default)

Service Architecture

The core uses a service registration pattern:

  1. Services are created during app initialization
  2. Services register themselves with PluginAPI
  3. Plugins access services through the unified API

Available Services

Service Description API Methods
Log Reader Read game chat.log read_log_lines()
Window Manager EU window info get_eu_window(), is_eu_focused()
OCR Screen text recognition recognize_text()
Screenshot Screen capture capture_screen()
Nexus API Item database search_items(), get_item_details()
HTTP Client Web requests http_get(), http_post()
Audio Sound playback play_sound()
Notifications Toast notifications show_notification()
Clipboard Copy/paste copy_to_clipboard(), paste_from_clipboard()
Event Bus Pub/sub events subscribe(), publish()
Data Store Key-value storage set_data(), get_data()
Tasks Background execution run_task()

Best Practices

For Plugin Developers

  1. Always inherit from BasePlugin: Use the provided base class for consistent behavior
  2. Use type hints: Add type annotations for better IDE support
  3. Handle errors gracefully: Wrap external calls in try/except blocks
  4. Clean up in shutdown(): Unsubscribe from events, close resources
  5. Use the API: Access services through PluginAPI rather than direct imports

For Core Contributors

  1. Maintain backward compatibility: Don't break existing plugin APIs
  2. Add type hints: All public methods should have type annotations
  3. Document thoroughly: Use docstrings with Args, Returns, Examples
  4. Follow PEP 8: Consistent naming (snake_case for functions/variables)
  5. Use lazy initialization: Expensive services should initialize on first use

Version History

Version Changes
2.1.0 Added comprehensive type hints, improved documentation
2.0.0 Three-tier API architecture, typed EventBus
1.0.0 Initial release

See Also