Gate Rz Coins on correct-first-try-within-time-limit; match coin-flight animation to it
Credits were previously awarded on any first attempt regardless of correctness or timing. The award now requires the first-ever attempt to be correct (record.Attempt.IsCorrect) and submitted before the adaptive per-question timer expired (new MetTimeLimit request field, computed client-side from the same elapsed/target comparison that already drives the visible countdown bar). The coin-flight animation in question_player.gd now only plays when both conditions are met (BlockSessionService.submit_core_attempt's existing "mastered" flag plus met_time_limit), so the effect never promises a coin that isn't actually earned. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -175,7 +175,7 @@ public class QuestionsController : ControllerBase
|
||||
_metrics.AttemptDuplicate();
|
||||
}
|
||||
await _reviewQueue.AddFromFirstAttemptAsync(record.Attempt);
|
||||
if (record.Inserted && !User.IsInRole("SUPER"))
|
||||
if (record.Inserted && record.Attempt.IsCorrect && req.MetTimeLimit && !User.IsInRole("SUPER"))
|
||||
await _credits.AwardForFirstAnswerAsync(userId, record.Attempt.Id ?? "");
|
||||
|
||||
var ratingOwner = Guid.NewGuid().ToString("N");
|
||||
|
||||
Reference in New Issue
Block a user