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:
@@ -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::{
|
||||
|
||||
Reference in New Issue
Block a user