feat(engine): cosmetic selectors applied, stats screen expanded, daily goals enforced
- Card backs: selected_card_back index maps to distinct Color values in card rendering - Backgrounds: selected_background index applied in TablePlugin alongside theme - Both re-render immediately on SettingsChangedEvent - Stats screen now shows Games Lost, Draw 1/3 Wins, and Lifetime Score - Daily challenge win no longer credited if server-supplied target_score or max_time_secs constraints are not met Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -150,10 +150,21 @@ fn handle_daily_completion(
|
||||
path: Res<ProgressStoragePath>,
|
||||
mut completed: EventWriter<DailyChallengeCompletedEvent>,
|
||||
) {
|
||||
for _ in wins.read() {
|
||||
for ev in wins.read() {
|
||||
if game.0.seed != daily.seed {
|
||||
continue;
|
||||
}
|
||||
// Enforce server-supplied goal constraints when present.
|
||||
if let Some(target) = daily.target_score {
|
||||
if ev.score < target {
|
||||
continue; // score goal not met
|
||||
}
|
||||
}
|
||||
if let Some(max_secs) = daily.max_time_secs {
|
||||
if ev.time_seconds > max_secs {
|
||||
continue; // time limit exceeded
|
||||
}
|
||||
}
|
||||
if !progress.0.record_daily_completion(daily.date) {
|
||||
// Already counted today — no-op.
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user