feat(registry): titles earned in play and picked by the player, reward looks in the catalog (P8) #26

Merged
kblack0610 merged 1 commit from feat/registry-titles into main 2026-11-06 05:58:21 +00:00
Owner

DodginBalls rewards-admin P8, registry half (plan dodginballs-rewards-admin.md): titles earned in play and reward looks as catalog items. The game half follows in unity-core-playground.

  • POST /api/v1/awards takes titles per player: a title award on either tier (decision 3: hosted progress reaches titles), granted once while live. The achievement rules live in the game, so the game server decides when a title is reached.
  • PUT /api/v1/accounts/me/title shows a held title (403 for one not held), "" clears it. GET /api/v1/accounts/me adds title and titles.
  • A session verify ({ticket, session}) also returns stats, the account's totals across games, so the server can add its own counts and tell when a title or unlock goal is reached without a read route of its own.
  • An unlock finds its reward item in the post's game first, then any game, so a look is listed once under playground and earned from any game.
  • Revoking the shown title on the Players page clears it.
  • catalog.json: the nine looks from the game's Resources/Customize/unlocks.json as kind reward, price 0, game playground.

Subtract first: handleMyStats's query moved into statTotals, shared with verify; nothing else removed.

assumed: a title's key is its display text (normalized like a name), because P7's admin title is free text and the game shows it as is.
assumed: titles are ledger awards rather than derived on the registry, because the counters behind an achievement are in the game's JSON; an admin stat edit therefore does not take a title back (revoke it on the Players page).

Tests: gofmt clean, go vet clean, go test 143 pass / 0 fail (new: TestTitlesAreEarnedOnEitherTierAndPicked, TestSessionVerifyCarriesTheAccountsTotals, TestUnlockFindsTheRewardInAnyGame).

NOT DEPLOYED: needs a registry-v* tag and the home-config image bump. The game half tolerates the deployed registry (unknown fields ignored, a 404 title route hides the picker).

Item: dbr-p8-titles

https://claude.ai/code/session_01KbJcEgZUaouuvuKJo3r6YU

DodginBalls rewards-admin P8, registry half (plan `dodginballs-rewards-admin.md`): titles earned in play and reward looks as catalog items. The game half follows in unity-core-playground. - `POST /api/v1/awards` takes `titles` per player: a `title` award on either tier (decision 3: hosted progress reaches titles), granted once while live. The achievement rules live in the game, so the game server decides when a title is reached. - `PUT /api/v1/accounts/me/title` shows a held title (`403` for one not held), `""` clears it. `GET /api/v1/accounts/me` adds `title` and `titles`. - A session verify (`{ticket, session}`) also returns `stats`, the account's totals across games, so the server can add its own counts and tell when a title or unlock goal is reached without a read route of its own. - An unlock finds its reward item in the post's game first, then any game, so a look is listed once under `playground` and earned from any game. - Revoking the shown title on the Players page clears it. - `catalog.json`: the nine looks from the game's `Resources/Customize/unlocks.json` as kind `reward`, price 0, game `playground`. Subtract first: `handleMyStats`'s query moved into `statTotals`, shared with verify; nothing else removed. assumed: a title's key is its display text (normalized like a name), because P7's admin title is free text and the game shows it as is. assumed: titles are ledger awards rather than derived on the registry, because the counters behind an achievement are in the game's JSON; an admin stat edit therefore does not take a title back (revoke it on the Players page). Tests: gofmt clean, go vet clean, go test 143 pass / 0 fail (new: `TestTitlesAreEarnedOnEitherTierAndPicked`, `TestSessionVerifyCarriesTheAccountsTotals`, `TestUnlockFindsTheRewardInAnyGame`). NOT DEPLOYED: needs a registry-v* tag and the home-config image bump. The game half tolerates the deployed registry (unknown fields ignored, a 404 title route hides the picker). Item: dbr-p8-titles https://claude.ai/code/session_01KbJcEgZUaouuvuKJo3r6YU
POST /api/v1/awards takes titles per player (either tier, once while live); PUT
/api/v1/accounts/me/title shows a held one; GET /accounts/me lists title and titles; a
session verify returns the account's totals across games so the game server can tell when
a title or unlock is reached; an unlock finds its reward item in any game; revoking the
shown title clears it; catalog.json lists the nine looks as kind reward under playground.

Claude-Session: https://claude.ai/code/session_01KbJcEgZUaouuvuKJo3r6YU
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kblack0610/bnb-game-servers!26
No description provided.