docs: add gregCore framework modularization analysis
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# gregCore Framework Analysis: Decoupling and Modularization
|
||||
|
||||
## Overview
|
||||
Currently, `gregCore` acts as both a foundational ModFramework and a collection of specific gameplay features. To ensure long-term maintainability and to follow the principle of "Principle of Least Surprise," non-essential features should be moved to separate mods. A core framework should provide tools, not dictate gameplay mechanics.
|
||||
|
||||
## 1. Components that SHOULD NOT be in Core
|
||||
These features are highly specific and "force" a certain gameplay style or technical overhead on every user/modder.
|
||||
|
||||
### A. Gameplay Mechanics
|
||||
* **DDoS Service (`GregDDoSService`):** Randomly breaking servers is a gameplay challenge, not a framework utility. It should be its own mod.
|
||||
* **Cohousing Service (`GregCohousingService`):** Demand multipliers and external capacity fallbacks are balance-altering mechanics.
|
||||
* **Technician & Employee Management (`CustomEmployeeManager`, `GregTechnicianService`):** These modify the game's HR system and should be part of a "Management Expansion" mod.
|
||||
* **Storage Server Expansion:** Specific hardware logic shouldn't reside in the core SDK.
|
||||
|
||||
### B. Specialized Tooling
|
||||
* **MCP Server (`GregMCPServer`):** While innovative, running an HTTP server for AI context is specialized. It should be an optional developer plugin.
|
||||
* **Data Exporter (`DataExporter`):** A massive utility for dumping game assets. This is a developer tool and belongs in a `gregExt.DevTools` plugin.
|
||||
|
||||
## 2. Components that SHOULD stay in Core
|
||||
These are the "glue" that makes modding easier, safer, and more consistent.
|
||||
|
||||
* **Input Coordination (`GregInputManagerService`):** Essential for preventing hotkey conflicts between different mods.
|
||||
* **UI Routing & Hijacking (`UIRouter`, `MainMenuPatch`):** Provides a unified way to manage state-based UI visibility.
|
||||
* **UXML Support (`GregUxmlService`):** Enables modern Unity UI Toolkit support, a fundamental technical capability.
|
||||
* **Network Sanity (`GregNetworkSanityService`):** Essential for fixing engine-level bugs ("No Traffic") that affect all mods.
|
||||
* **Event Dispatcher (`gregEventDispatcher`):** The central nervous system for inter-mod communication.
|
||||
* **Harmony Lifecycle Management:** Safe initialization and patching patterns.
|
||||
|
||||
## 3. Recommended Strategy: The "Clean Core" Path
|
||||
|
||||
1. **Refactor gregCore:** Strip out all `Service` classes that deal with specific game logic (DDoS, Cohousing, Employees).
|
||||
2. **Modularize:** Re-release these as "Official Greg Mods" (e.g., `gregMod.NetworkThreats`, `gregMod.HRManagement`).
|
||||
3. **SDK focus:** Keep `gregCore` as a pure technical bridge. If a feature (like `JadeBox`) is meant to be shared, keep the *interface* in Core but the *implementation* could even be a mandatory plugin.
|
||||
|
||||
---
|
||||
*Generated by Gemini CLI - April 2026*
|
||||
Reference in New Issue
Block a user