forked from unimatrix/web
Publish shared claim tariffs and web-only Home Block placeholders
This commit is contained in:
parent
2aca998700
commit
8bc629c3ac
1 changed files with 116 additions and 5 deletions
64
docs/design/CLAIMS-HOME-BLOCK-BRIDGE.md
Normal file
64
docs/design/CLAIMS-HOME-BLOCK-BRIDGE.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Claims: web-first catalogue and future Home Block bridge
|
||||
|
||||
Current batch: public rates and CP placeholders only. Catalogue:
|
||||
`website/control-panel/public/cp-v2/cp-v2-claim-tariffs.mjs`, shared by public guide,
|
||||
Claims page, clan settings and dashboard. It assigns no actual tier or claim.
|
||||
Capacity is total whole chunks per organisation; company/protected capacity is
|
||||
floored after ×1.5. Their cost factors are respectively ×1.5 and ×0.5, applied to
|
||||
both monthly and one-time prices. Do not stack multipliers or recalculate prices
|
||||
from rounded capacity. A chunk is 16×16 blocks, not a radius.
|
||||
|
||||
The dossier/workflow backend is UNDECIDED: osTicket or another implementation.
|
||||
Do not add ticket-schema assumptions, provision an osTicket instance or bind web
|
||||
forms to a chosen backend in this phase. Reserved API names describe an interface,
|
||||
not a selected storage/workflow implementation. Backend simulation tests below
|
||||
belong to the later backend/night run, not this placeholder-only web batch.
|
||||
|
||||
## Reserved API contract — not live endpoints
|
||||
|
||||
- Root: `/api/v1/claims/home-blocks`.
|
||||
- Read one block: `GET /api/v1/claims/home-blocks/{homeBlockId}`.
|
||||
- Game intent: `POST /api/v1/claims/home-blocks/{homeBlockId}/commands`.
|
||||
- Verified game results/events: `POST /api/v1/claims/home-blocks/{homeBlockId}/events`.
|
||||
|
||||
Use a stable homeBlockId UUID for upgrades, conquest and server events. Record
|
||||
organisation kind/id, server/world UUID, anchor coordinates, desired/applied
|
||||
revision, mapped WorldGuard region IDs, request/event IDs and correlation IDs.
|
||||
Protected eligibility and authority come from server records, never a browser
|
||||
tariff selector. Protect game requests with the established bridge authentication,
|
||||
bounded freshness/replay checks and explicit server scope; no browser-held game
|
||||
credential or raw shell/WorldGuard command endpoint.
|
||||
|
||||
Command names reserved: `claim.tier.upgrade`, `claim.conquest`, `claim.server-event`.
|
||||
Events include `claim.upgrade.requested`, `claim.upgrade.applied`,
|
||||
`claim.upgrade.failed`, `claim.conquest.started`, `claim.conquest.resolved`,
|
||||
`claim.server-event.started`, `claim.server-event.ended`.
|
||||
|
||||
Claim-capacity upgrades originate ingame by RIGHT-CLICKING THE HOME BLOCK.
|
||||
The website reads limits, rates and status. Organisation-status keys continue to
|
||||
use central Redeem; they are distinct from the Home Block's capacity-tier action.
|
||||
Conquest is a later mother-house feature, not part of Basic. Server events also
|
||||
attach to this same Home Block identity. The game implementation comes later.
|
||||
|
||||
## Future game adapter
|
||||
|
||||
Use the existing central API and DuneProtect integration with a WorldGuard adapter.
|
||||
Inspect installed versions and existing region/priority rules before implementing.
|
||||
Map only explicitly managed claim regions. Never overwrite unrelated/global/staff
|
||||
regions. Region dimensions, vertical bounds and overlap policy need confirmation.
|
||||
The web must distinguish requested/quoted, pending game application, applied,
|
||||
failed/reconciliation states. Do not report a changed region or paid upgrade
|
||||
merely because a command was accepted. Bank charging needs durable idempotency and
|
||||
an explicit failure/reconciliation policy across the bank and game systems.
|
||||
|
||||
## Required backend tests before the ingame adapter exists
|
||||
|
||||
Use a fake authenticated game adapter and a dry-run developer command to simulate
|
||||
right-clicks, conquest and server events. Never mutate real balances, regions or
|
||||
ownership during dry runs. Tests must cover correct sequential price/capacity,
|
||||
key/status requirements, owner/officer permissions, protected restrictions,
|
||||
insufficient funds, forged organisation/server/world, stale revisions, duplicate
|
||||
requests/events, missing/occupied anchors, conflicting regions, WorldGuard timeout
|
||||
or rejection, failure/retry reconciliation and replayed conquest/server events.
|
||||
Distinguish simulated acceptance from actual game confirmation. Later run the
|
||||
same contract tests against a real WorldGuard adapter in a test world.
|
||||
Loading…
Reference in a new issue

Staff