From 46c3bf4bb25853725c6269919b5fa6ca06286806 Mon Sep 17 00:00:00 2001 From: funman300 Date: Tue, 12 May 2026 17:54:59 -0700 Subject: [PATCH] fix(engine): profile achievement count derived from ALL_ACHIEVEMENTS Hardcoded 18 in the profile summary line diverged from the actual count of 19. Use ALL_ACHIEVEMENTS.len() so the count stays in sync when new achievements are added. Co-Authored-By: Claude Sonnet 4.6 --- solitaire_engine/src/profile_plugin.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solitaire_engine/src/profile_plugin.rs b/solitaire_engine/src/profile_plugin.rs index c41348c..e6c81d0 100644 --- a/solitaire_engine/src/profile_plugin.rs +++ b/solitaire_engine/src/profile_plugin.rs @@ -8,7 +8,7 @@ use bevy::input::mouse::{MouseScrollUnit, MouseWheel}; use bevy::input::ButtonInput; use bevy::prelude::*; use chrono::{Duration, Local, NaiveDate}; -use solitaire_core::achievement::achievement_by_id; +use solitaire_core::achievement::{achievement_by_id, ALL_ACHIEVEMENTS}; use solitaire_data::SyncBackend; use crate::achievement_plugin::AchievementsResource; @@ -323,7 +323,7 @@ fn spawn_profile_screen( let records = &ar.0; let unlocked_count = records.iter().filter(|r| r.unlocked).count(); body.spawn(( - Text::new(format!("{unlocked_count} / 18 unlocked")), + Text::new(format!("{unlocked_count} / {} unlocked", ALL_ACHIEVEMENTS.len())), font_row.clone(), TextColor(ACCENT_PRIMARY), ));