Skip to content

feat: add optional absolute count to achievement progress#179

Merged
cjmellor merged 3 commits into
mainfrom
achievement-count
Jul 10, 2026
Merged

feat: add optional absolute count to achievement progress#179
cjmellor merged 3 commits into
mainfrom
achievement-count

Conversation

@cjmellor

@cjmellor cjmellor commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Achievement progress is a 0–100 percentage, so it can't reconstruct the absolute number behind it — how many games were played, articles read, and so on (requested in #145). This adds an optional count on the achievement, set when granting via grantAchievement(achievement: $a, progress: 50, count: 5) and increased alongside progress via incrementAchievementProgress(achievement: $a, amount: 10, count: 1). Unlike progress, the count is open-ended rather than capped at 100, and a null starting value is treated as zero on first increment. The increment amount is also carried on the AchievementProgressionIncreased event so listeners can react to it.

Closes #145

cjmellor added 2 commits July 10, 2026 21:42
Achievement progress is a 0-100 percentage, which can't reconstruct the
absolute number behind it (games played, articles read, etc.). Add a
nullable, open-ended count column to the achievement_user pivot,
settable via grantAchievement() and incremented alongside progress via
incrementAchievementProgress(). The count increment is carried on the
AchievementProgressionIncreased event.
@cjmellor
cjmellor marked this pull request as ready for review July 10, 2026 20:56
@cjmellor
cjmellor merged commit 0a27f29 into main Jul 10, 2026
12 checks passed
@cjmellor
cjmellor deleted the achievement-count branch July 10, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant