How sirspam/nya works
Main Components
• Plugin & Core Mod Initialization:
• Main entry point in Plugin.cs.
• Installers (NyaAppInstaller, NyaGameInstaller, NyaMenuInstaller) as they handle dependency injection setup.
• Configuration & API Management:
• Configuration folder (EndpointData.cs, PluginConfig.cs) which stores endpoint configurations.
• ImageSourcesManager (found in Managers) and associated Entries.
• UI Components:
• UI folder structure: FlowCoordinators, ViewControllers (for modal dialogs like Settings, GitHub page, nsfw confirm, etc.), and the Views defined in .bsml files.
• That UI elements interact with the mod’s settings and image display functionality.
• Core Functionalities:
• AffinityPatches (which are possibly runtime patches to modify the game behavior).
• Utility & Helpers:
• Utils (FloatingScreenUtils, ImageUtils, UIUtils, WebUtils) that support the mod’s operations such as image processing, web operations, or UI adjustments.
• Resources & Assets:
• Resources folder and manifest.json that likely bundle assets (such as the nya.bundle) needed by the mod.
Relationships and Interactions
• Dependency Injection Flow:
• UI Interaction Flow:
• How interface elements (FlowCoordinators and ViewControllers) interact with the Components to trigger image fetches, settings changes, or to reset positions for the floating screen.
• Data & Configuration Handling:
• Out how Configuration classes feed into both ImageSourcesManager and the Installer’s dependency injection configurations.
• Integration with External APIs:
• Connection between the JSON configuration (ImageSourcesJsonLink in Plugin.cs) and how ImageSourcesManager fetches API endpoints.
Architectural Patterns and Key Technologies
• Layers and Separation of Concerns:
• MVC or MVVM-like Structure in UI:
• That the UI folder contains both controllers and views (the bsml files support a declarative view framework), which suggests a clear separation between graphical presentation and logic.
• Dependency Injection:
• Since the project uses installer classes (probably leveraging frameworks like SiraUtil), highlight this as a key pattern for managing dependencies.
• External and Local Data Sources:
• That the mod consumes external web APIs (via JSON configurations) as well as local file directories managed through its configuration and entries.