Log inGet started
Package

card.module

README.md

card

Two cards laid over play: a district's rule card (how this district plays: its eyes,

its roads, its cover, its ways out, and what colour opens) and a decision (a mission or a job asking which way).

  local Card = require("~.screens.card")
  local tree = Card.rules(data, env)         -- data: Present.ruleCard(district, t) + { close = string }
  local tree = Card.decision(data, env)      -- data: Present.decision(objective, t) + { selected = index, timer = { left, duration }? }
  local tree = Card.subtitle(data, env)      -- data: Present.subtitle(line, t, settings); a line of speech at the bottom

env: { frame, text, glyph }
Callback ids (through modules.app, where the rule card is the screen "rules"): "rules:back";
"decision:<optionId>" (the app's confirm sends the selected one).
The rule card is shown the first time a district is entered and from the map; the decision holds the mission
until one option is chosen (it cannot be closed).

The interface is documented in the header of init.luau; this file repeats it for the asset browser.