adventure: let a player act from the web, not just read about it
The equip queue proved the reverse pipe works. This gives it verbs that play the game: pull out of a run from the adventurer page, take today's bout from the war room. Its own table and its own poll, not more actions on equip_orders. Every column of that table is equip vocabulary (item, slot, tier) and these verbs act on the character rather than on something it is carrying. Nothing in a request names an adventurer. The session maps to one localpart and a localpart to one adventurer, so Pete resolves the character itself and there is no id on the wire to forge. The panel's copy is kept honest by the verdict: an applied action hides the offer it has just spent, a refusal puts the button back. Watching it run is what put that there, along with the strip's layout — gogobee answers a bout with a whole sentence of damage, which the equip strip's two-column row squeezed into a column and wrapped the verb. Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
@@ -295,6 +295,13 @@ func New(cfg config.WebConfig, sources []config.SourceConfig, postingEnabled boo
|
||||
mux.HandleFunc("GET /api/equip/pending", s.handleEquipPending)
|
||||
mux.HandleFunc("POST /api/equip/verdict", s.handleEquipVerdict)
|
||||
|
||||
// The action queue's game-box wire: gogobee polls the verbs an owner asked for
|
||||
// from the web (pull out of a run, take today's bout) and pushes a verdict.
|
||||
// Bearer-authed for the same reason as every seam above it. Its own poll and
|
||||
// its own table, not more actions on the equip queue — see storage/orders.go.
|
||||
mux.HandleFunc("GET /api/adventure/orders/pending", s.handleAdvOrdersPending)
|
||||
mux.HandleFunc("POST /api/adventure/orders/verdict", s.handleAdvOrderVerdict)
|
||||
|
||||
// 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.
|
||||
@@ -328,6 +335,12 @@ func New(cfg config.WebConfig, sources []config.SourceConfig, postingEnabled boo
|
||||
// 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)
|
||||
|
||||
// The action queue, owner side. Signed-in only — the session IS the
|
||||
// character, there is nothing in the request to identify one — and gated
|
||||
// on the adventure seam like everything else here.
|
||||
mux.HandleFunc("POST /api/adventure/order", s.handleAdvOrder)
|
||||
mux.HandleFunc("GET /api/adventure/orders", s.handleAdvOrders)
|
||||
}
|
||||
if s.cfg.Push.Enabled {
|
||||
mux.HandleFunc("POST /api/push/subscribe", s.handlePushSubscribe)
|
||||
|
||||
Reference in New Issue
Block a user