Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 0a0b119f-a…

crew

The people Wren knows: how far each trusts her, and what that trust opens.

byzero-proxy @ DESKTOP-DB3UJOJ·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.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

metropolisGame.logic.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, band, open } } } } crew:serialise() crew:restore(data) Hub events: "trust" { contact, value, delta, why }, "service" { contact, service, open }, "met" { contact }.

new(contacts: any, hub: any?) → any

argtypedescription
contactsany
hubany?

emit(self: any, name: string, payload: any) → void

argtypedescription
selfany
namestring
payloadany

meet(id: string) → boolean

argtypedescription
idstring

met(id: string) → boolean

argtypedescription
idstring

trust(id: string) → number

argtypedescription
idstring

band(value: number) → string

The name of the trust band a value falls in.

argtypedescription
valuenumber

open(def: any, service: any, trust: number) → boolean

argtypedescription
defany
serviceany
trustnumber

change(id: string, delta: number, why: string?) → number

Move a contact's trust. Returns the new value.

argtypedescription
idstring
deltanumber
whystring?

gives(id: string) → boolean

Whether a contact still gives work and services.

argtypedescription
idstring

provider(serviceId: string) → string

The contact whose open service this is, or nil.

argtypedescription
serviceIdstring

has(serviceId: string) → boolean

argtypedescription
serviceIdstring

view( ) → void

serialise( ) → any

restore(data: any) → void

argtypedescription
dataany

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.