refactor(core): add missing derives to AchievementContext (M-20)
Add PartialEq, Eq, Serialize, Deserialize to AchievementContext per CLAUDE.md §5.3 derive order. The struct holds only primitive types (u32, u64, i32, bool, Option<u32>) so all four derives apply without complications. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
//! walks `ALL_ACHIEVEMENTS`, evaluates each `condition`, and emits an
|
||||
//! unlock event for any `AchievementDef` whose record is not yet unlocked.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Fields needed by achievement conditions. Constructed by the engine from
|
||||
/// `StatsSnapshot`, the final `GameState`, and wall-clock time.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct AchievementContext {
|
||||
/// Total number of games played (after this win has been recorded).
|
||||
pub games_played: u32,
|
||||
|
||||
Reference in New Issue
Block a user