Repository navigation
Refactor configuration management for events, rewards, and presets - #20
Merged
Merged
Conversation
…, rewards, visuals, and schedules
…eprecate legacy options
…ion for events, rewards, schedules, and visuals
…ce visuals, and deprecate legacy options
…rewards, schedules, and visuals
…or events, rewards, schedules, and visuals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the way configuration presets (events, rewards, schedules, visuals) are managed in the codebase. The main change is the removal of the
FallingStarsConfigManagerin favor of handling all preset management through static methods in theFSConfigclass. This simplifies the configuration workflow, centralizes logic, and reduces code duplication. Additionally, a newFSPresetsclass is introduced to encapsulate the structure of each preset type.Configuration Management Refactor:
Removed the
FallingStarsConfigManagerand all its usages, replacing them with static methods inFSConfigfor loading, deleting, and listing presets. This affects how presets are managed throughout the codebase, streamlining configuration handling. [1] [2] [3] [4] [5] [6] [7] [8] [9]Updated command implementations (such as preset suggestions and deletion) to use the new
FSConfigmethods instead of accessing config managers, simplifying command logic and improving maintainability. [1] [2]New Preset Structure:
FSPresetsclass, which defines the config structure for event, reward, schedule, and visuals presets usingModConfigSpec. This provides a clear and centralized schema for all preset types.Configuration Registration:
Metrics and Status Reporting:
FSConfigstatic methods for reporting preset counts, ensuring consistency with the refactored configuration management.These changes significantly clean up the configuration management code and make it easier to extend or maintain in the future.