feat(engine): add ProgressPlugin awarding XP on wins with level-up events

On GameWonEvent, computes xp_for_win(time, used_undo) from
solitaire_data, calls PlayerProgress::add_xp, and emits LevelUpEvent
when the level changes. Persists atomically through the configurable
storage path; ProgressPlugin::headless() disables I/O for tests.

Introduces ProgressUpdate system set so future systems can run after
progress mutations.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-24 19:11:22 -07:00
parent cfdb3b7547
commit ef043c14d4
3 changed files with 213 additions and 2 deletions
+2
View File
@@ -7,11 +7,13 @@ pub mod events;
pub mod game_plugin;
pub mod input_plugin;
pub mod layout;
pub mod progress_plugin;
pub mod resources;
pub mod stats_plugin;
pub mod table_plugin;
pub use achievement_plugin::{AchievementPlugin, AchievementsResource};
pub use progress_plugin::{LevelUpEvent, ProgressPlugin, ProgressResource, ProgressUpdate};
pub use animation_plugin::{AnimationPlugin, CardAnim};
pub use card_plugin::{CardEntity, CardLabel, CardPlugin};
pub use events::{