adventure: let an owner equip and unequip from their own page
The one adventure ask that carries intent back to the game box, built the mischief way: no new network route, Pete records the equip/unequip and gogobee polls it and files a verdict. The who page grows Equip / Take off buttons on the owner's own worn and backpack panels, and a pending-changes strip that shows 'queued' until the verdict lands, never claiming a change it can't see. The item handle is the inventory row id, sent only on wearable magic items, so a non-zero id is also what gates the button. gogobee resolves the owner by localpart, never a name.
This commit is contained in:
@@ -255,6 +255,13 @@ func New(cfg config.WebConfig, sources []config.SourceConfig, postingEnabled boo
|
||||
mux.HandleFunc("GET /api/mischief/pending", s.handleMischiefPending)
|
||||
mux.HandleFunc("POST /api/mischief/claim", s.handleMischiefClaim)
|
||||
|
||||
// The equip queue's game-box wire: gogobee polls pending equip/unequip orders
|
||||
// and pushes a verdict. Same bearer token and same reason as the pair above —
|
||||
// the caller is a machine on the tailnet. The owner-facing half hangs off the
|
||||
// auth block below.
|
||||
mux.HandleFunc("GET /api/equip/pending", s.handleEquipPending)
|
||||
mux.HandleFunc("POST /api/equip/verdict", s.handleEquipVerdict)
|
||||
|
||||
// The casino. Signed-in only — there is money in it — so these hang off the
|
||||
// auth block, and gamesReady() also insists on a Matrix server name: without
|
||||
// one, no player can be named to gogobee's ledger and the tables stay shut.
|
||||
@@ -282,6 +289,12 @@ func New(cfg config.WebConfig, sources []config.SourceConfig, postingEnabled boo
|
||||
mux.HandleFunc("GET /api/mischief/catalog", s.handleMischiefCatalog)
|
||||
mux.HandleFunc("POST /api/mischief/order", s.handleMischiefOrder)
|
||||
mux.HandleFunc("GET /api/mischief/orders", s.handleMischiefOrders)
|
||||
|
||||
// The equip queue, owner side. Signed-in only — an order dresses a
|
||||
// specific owner's character — and gated on the adventure seam like the
|
||||
// storefront, since without a board there is no detail page to equip from.
|
||||
mux.HandleFunc("POST /api/equip/order", s.handleEquipOrder)
|
||||
mux.HandleFunc("GET /api/equip/orders", s.handleEquipOrders)
|
||||
}
|
||||
if s.cfg.Push.Enabled {
|
||||
mux.HandleFunc("POST /api/push/subscribe", s.handlePushSubscribe)
|
||||
|
||||
Reference in New Issue
Block a user