shop.module
README.md
shop
a counter: what is for sale, what it costs, and what you have to pay with.
local Shop = require("~.screens.shop") local tree = Shop.build(data, env)
data: { title, kicker = string?, -- the shop's name; who keeps it or what hour it is items = { { id, label, note?, disabled?, about?, price?, swatch = "#hex"? } }, selected, purse = { sous, renown, rankName }, carried = { { name, hex, tins } }, room = string?, -- what is in the satchel, and the room left said = string?, -- the last thing that happened ("6 tins of Ochre. 24 sous.") labels = { buy, back, carried } } env: { frame, text, glyph } Callback ids are "shop:<id>" for a row and "shop:back". A row is bought with the menu's confirm; the list is the same W.menu every menu uses, so it answers the pointer too.