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:
funman300
2026-05-17 21:22:54 -07:00
parent 132fea911c
commit 0ecc1a92fd
+3 -1
View File
@@ -8,9 +8,11 @@
//! walks `ALL_ACHIEVEMENTS`, evaluates each `condition`, and emits an //! walks `ALL_ACHIEVEMENTS`, evaluates each `condition`, and emits an
//! unlock event for any `AchievementDef` whose record is not yet unlocked. //! 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 /// Fields needed by achievement conditions. Constructed by the engine from
/// `StatsSnapshot`, the final `GameState`, and wall-clock time. /// `StatsSnapshot`, the final `GameState`, and wall-clock time.
#[derive(Debug, Clone)] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct AchievementContext { pub struct AchievementContext {
/// Total number of games played (after this win has been recorded). /// Total number of games played (after this win has been recorded).
pub games_played: u32, pub games_played: u32,