▣
module · drop-in viewer
crew
The people Wren knows: how far each trusts her, and what that trust opens.
by·posted 11d ago
What it does
crew
The people Wren knows: how far each trusts her, and what that trust opens.
A contact (content.contacts) has a trust from -100 (they cross the street) to 100. Trust moves when jobs go
well or badly and when choices favour or betray them; every change carries a reason the UI can show. At
thresholds a contact offers SERVICES (a lookout at a corner, a driver, a decoy, a doctor who restores colour,
a fence who takes borrowed cars, cheaper paint): `crew:has("lookout")` is what the rest of the game asks.
Below zero a contact gives no work and no service until trust is rebuilt.
local Crew = require("metropolisGame.logic.crew")
local crew = Crew.new(Contacts, hub?) -- Contacts: content.contacts
crew:meet("pim") -- first met (appears in the list); returns false if known
crew:trust("pim") -- number (the contact's start value before any change)
crew:change("pim", 10, "job_clean") -- returns the new trust; emits "trust", and "service" for
-- each service the change opened or closed
crew:has("lookout") crew:provider("lookout") -- is the service open, and who gives it
crew:gives("pim") -- false while trust is below zero
crew:view() -- { { id, met, trust, band = "wary" | "cool" | "warm" | "close" | "sworn", services = { { id, at, open } } } }
crew:serialise() crew:restore(data)
Hub events: "trust" { contact, value, delta, why }, "service" { contact, service, open }, "met" { contact }.
The interface is documented in the header of init.luau; this file repeats it for the asset browser.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.