Skip to content

Refactor configuration management for events, rewards, and presets - #20

Merged
Adammatthiesen merged 6 commits into
mainfrom
refactor-configs
Aug 12, 2026
Merged

Adammatthiesen merged 6 commits into
mainfrom
refactor-configs

Conversation

@Adammatthiesen

@Adammatthiesen Adammatthiesen commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

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 FallingStarsConfigManager in favor of handling all preset management through static methods in the FSConfig class. This simplifies the configuration workflow, centralizes logic, and reduces code duplication. Additionally, a new FSPresets class is introduced to encapsulate the structure of each preset type.

Configuration Management Refactor:

  • Removed the FallingStarsConfigManager and all its usages, replacing them with static methods in FSConfig for 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 FSConfig methods instead of accessing config managers, simplifying command logic and improving maintainability. [1] [2]

New Preset Structure:

  • Added the FSPresets class, which defines the config structure for event, reward, schedule, and visuals presets using ModConfigSpec. This provides a clear and centralized schema for all preset types.

Configuration Registration:

  • Updated the initialization logic to register separate config files for events, rewards, schedules, and visuals, ensuring that each preset type is managed in its own file.

Metrics and Status Reporting:

  • Updated status commands to use the new FSConfig static 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.

@Adammatthiesen
Adammatthiesen marked this pull request as ready for review August 12, 2026 01:19
@Adammatthiesen
Adammatthiesen merged commit 964802e into main Aug 12, 2026
1 check passed
@Adammatthiesen
Adammatthiesen deleted the refactor-configs branch August 12, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant