How geming400/showunlistedlevelsinlevelcells works
Project Context & Queueing Purpose
• This mod is written in C++ and aims to mark and display unlisted or friends-only levels. One of its key functionalities is that upon discovering or uploading levels, it inserts them into a “queue” for further checking (e.g., determining if the level is friends only).
Main Components of the Queueing Part
• Discovery Component (Input Source): This represents where levels are discovered (e.g., during the level search or saved levels view). The discovery process (from src/search/gdLevelSearch.[cpp/hpp] or level discovery routines) triggers a “queue” insertion.
• Queue Manager: This is your central module for handling queued level requests. It’s implemented primarily by the files in src/queue/queueRequests.cpp / .hpp. This component is responsible for adding levels to the queue, managing the queue’s processing, and delegating tasks.
• Level Checker/Processor: This part represents the logic for checking the level’s status (friends only or unlisted). Although the queue only deals with “friends only” checks as noted, it is part of the overall processing flow.
• Settings & Configuration Influences: In src/settings/ you have files like onQueueRequestsTimingChange.cpp and stopQueue.cpp which imply that the behavior of the queue (e.g., timing adjustments, or pausing the queue) can be altered via mod settings. This module interacts with the Queue Manager to modify the queue processing.
• Utility and Scheduling Helpers: Files in src/utils (and perhaps src/include/NewTaskScheduler.[cpp/hpp]) support asynchronous operations or scheduling tasks required in processing queue items.
• Optionally, include a “Utility/Scheduler” component (e.g., referencing NewTaskScheduler) that assists the Queue Manager in handling delays or task scheduling.
Architectural Patterns & Design Principles
• Modularity: Emphasize the decoupling of the discovery logic, queuing, and UI feedback.
• Configurability: Show the interaction between the mod’s settings components and the queueing logic.