feat(earnings): gate rewards by user progress

This commit is contained in:
simoleo89
2026-06-15 21:49:45 +02:00
parent 766d8d67d3
commit 22b05b4e52
5 changed files with 59 additions and 6 deletions
+2
View File
@@ -82,6 +82,8 @@ For `points`, `pointsType` carries the currency type. For `badge`, `data` carrie
- `marketplace`: sold marketplace offers waiting for payout
- `hc_payday`: unclaimed rows in `logs_hc_payday`
- `achievements`: configured rewards gated by achievement score buckets
- `level_progress`: configured rewards gated by citizenship/helper talent level
## Result Status
@@ -67,6 +67,7 @@ Add emulator settings with safe defaults:
The feature defaults off so existing hotels do not receive surprise economy changes after deploying the jar.
Marketplace and HC payday default to native integrations once the feature is enabled, because both already have server-side claim ledgers.
Achievements and level progress use native eligibility by default: achievement score buckets and talent-track levels decide when the configured reward may be claimed.
## Packet Contract
@@ -94,6 +95,8 @@ Composer format is intentionally simple and renderer-friendly: category key, ena
- `claim all` processes only claimable rows and returns per-category results.
- Marketplace claims use the existing marketplace sold-offer payout path.
- HC payday claims use existing unclaimed `logs_hc_payday` rows.
- Achievement claims can be scoped to score buckets via `earnings.achievements.score.step`.
- Level progress claims can be scoped to the current highest citizenship/helper level.
## Tests