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

session

One player: everything that is hers alone. Her paint and tools and arms, her

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

session

One player: everything that is hers alone. Her paint and tools and arms, her

colour, her money and renown, her crew's trust, her vehicles, her heat and record with the Wardens, her
missions and activities, what the city remembers of her. The world she paints in (murals, district colour,
the clock, paint in the air) belongs to logic.game and is shared by every session.

  local session = game:session("p1")          -- made by the game (Session.new(game, id))
  session:frame(dt, pf) -> view               -- once a tick; `pf` is this player's frame (see logic.game)
  session.hub                                 -- her own hub: pursuitKit's events and this module's; the game
                                              --   forwards every event to game.hub with e.player = id
  Parts, all public: satchel, vanStock, painter, arms, colour, progression, crew, fleet, response (director,
  theft, roster, record, roadblocks ...), runner (missions), board (activities), chronicle.

What the player does (the host calls these when the matching control is used; each returns ok, why):
  session:buyTins(pigment, n)        session:buyUpgrade(id)       session:buyService("doctor" | "respray" | "plates" | "wash_down", arg)
  session:cycleTool(step)   session:cycleArm(step)   session:selectArm(id)   session:cyclePigment(step)
  session:loadFromVan(pigment, n)    session:placeStash(x, z, pigment, n)    session:takeStash(index)
  session:shed("jacket" | "plates", newValue)                    -- out of sight; needs the upgrade; once an incident
  session:takeVehicle({ id, type, colour, plate, state }, witnessed)   session:leaveVehicle()
  session:storeVehicle(district)     session:retrieveVehicle(district)     session:fenceVehicle()
  session:arrange(wardenId, { how, weekday })                    -- bribe or lean on a named Warden
  session:startMission(id)   session:retryMission()   session:startActivity(id)   session:choose(option)
  session:event(name, payload)                                   -- something the host saw happen (talked, delivered ...)
  session:rest(hour)                                             -- pass time at a safehouse
  session:serialise()   session:restore(data)

Hub events added here (all carry what the UI needs to say it): "signed", "paintRefused", "fireRefused",
"billApplied", "seized", "escapeAward", "shop", "shedDone", "teach" (first time only), "districtEntered",
"vehicleTaken", "vehicleLeft", "washedOut", "revived", "reward", "stipend", "arranged", "arrangementUsed",
"ejected", plus those of progression, crew, fleet, the runner ("mission...") and the board ("activity...").

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.session — one player: everything that is hers alone. Her paint and tools and arms, her colour, her money and renown, her crew's trust, her vehicles, her heat and record with the Wardens, her missions and activities, what the city remembers of her. The world she paints in (murals, district colour, the clock, paint in the air) belongs to logic.game and is shared by every session. local session = game:session("p1") -- made by the game (Session.new(game, id)) session:frame(dt, pf) -> view -- once a tick; `pf` is this player's frame (see logic.game) session.hub -- her own hub: pursuitKit's events and this module's; the game -- forwards every event to game.hub with e.player = id Parts, all public: satchel, vanStock, painter, arms, colour, progression, crew, fleet, response (director, theft, roster, record, roadblocks ...), runner (missions), board (activities), chronicle. What the player does (the host calls these when the matching control is used; each returns ok, why): session:buyTins(pigment, n) session:buyUpgrade(id) session:buyService("doctor" | "respray" | "plates" | "wash_down", arg) session:cycleTool(step) session:cycleArm(step) session:selectArm(id) session:cyclePigment(step) session:loadFromVan(pigment, n) session:placeStash(x, z, pigment, n) session:takeStash(index) session:shed("jacket" | "plates", newValue) -- out of sight; needs the upgrade; once an incident session:takeVehicle({ id, type, colour, plate, state }, witnessed) session:leaveVehicle() session:storeVehicle(district) session:retrieveVehicle(district) session:fenceVehicle() session:arrange(wardenId, { how, weekday }) -- bribe or lean on a named Warden session:startMission(id) session:retryMission() session:startActivity(id) session:choose(option) session:event(name, payload) -- something the host saw happen (talked, delivered ...) session:rest(hour) -- pass time at a safehouse session:serialise() session:restore(data) Hub events added here (all carry what the UI needs to say it): "signed", "paintRefused", "fireRefused", "billApplied", "seized", "escapeAward", "shop", "shedDone", "teach" (first time only), "districtEntered", "vehicleTaken", "vehicleLeft", "washedOut", "revived", "reward", "stipend", "arranged", "arrangementUsed", "ejected", plus those of progression, crew, fleet, the runner ("mission...") and the board ("activity...").

new(game: any, id: string) → any

A new player in a game. See the header.

argtypedescription
gameany
idstring

bill(level: number, ctx: any) → void

argtypedescription
levelnumber
ctxany

teach(key: string) → void

A first-time line: emitted once per save.

argtypedescription
keystring

applyLoadout( ) → void

Bring the carried limits, tools and arms into line with the upgrades owned.

hasFlag(flag: string) → boolean

argtypedescription
flagstring

event(name: string, payload: any?) → void

Report something that happened to the running mission and the running activity.

argtypedescription
namestring
payloadany?

stage(list: { any }?) → void

The game-side stage directions of a step or twist (the host's own are handled by the driver).

argtypedescription
list{ any }?

reward(r: any, why: string?) → void

Apply a reward table (a mission's, an activity's choice, a memory's). Emits "reward" with what was given.

argtypedescription
rany
whystring?

release(what: string, how: string) → boolean

Take a confiscated thing ("van" | "ladder" | "stash") out of the impound: "pay" charges today's fee, "break" does not. Returns true when it came out (false: not there, or the fee could not be paid).

argtypedescription
whatstring
howstring

bill(level: number, ctx: any?) → any

The bill an arrest (or an ejection) would present now.

argtypedescription
levelnumber
ctxany?

applyBill(bill: any, level: number, outcome: string?) → void

Take what the bill says, and put the incident to rest.

argtypedescription
billany
levelnumber
outcomestring?

shopFactor(self: any) → number

argtypedescription
selfany

buyTins(pigment: string, n: number) → void

Buy tins at the present price. Returns ok, why.

argtypedescription
pigmentstring
nnumber

buyUpgrade(id: string) → void

argtypedescription
idstring

buyService(service: string, arg: any?) → void

Things done for sous: "doctor" (colour back), "respray" (arg = colour), "plates" (arg = plate), "wash_down".

argtypedescription
servicestring
argany?

cycleTool(step: number) → string

argtypedescription
stepnumber

cycleArm(step: number) → string

argtypedescription
stepnumber

selectArm(id: string) → boolean

argtypedescription
idstring

cyclePigment(step: number) → string

Step the pigment for both hands (the can on the wall and the arm share what is loaded).

argtypedescription
stepnumber

loadFromVan(pigment: string, n: number) → number

Move tins from the van to the satchel (the host checks she is at the van).

argtypedescription
pigmentstring
nnumber

placeStash(x: number, z: number, pigment: string, n: number) → number

Leave a stash. Returns its index, or nil when the limit is reached or nothing moved.

argtypedescription
xnumber
znumber
pigmentstring
nnumber

takeStash(index: number) → number

Empty a stash into the satchel as far as it fits. A stash left empty is removed.

argtypedescription
indexnumber

shed(what: string, newValue: string?) → boolean

Lose a description. Only out of sight, with the upgrade, once per incident. Returns true if it was shed.

argtypedescription
whatstring
newValuestring?

takeVehicle(v: any, witnessed: boolean?) → any

She takes the wheel of a vehicle. `v` = { id, type, colour, plate, state }; `witnessed`: someone saw it taken.

argtypedescription
vany
witnessedboolean?

leaveVehicle( ) → void

colourOf(self: any) → void

argtypedescription
selfany

storeVehicle(district: string) → void

Put the borrowed vehicle she is driving in a district's garage.

argtypedescription
districtstring

retrieveVehicle(district: string) → any

argtypedescription
districtstring

fenceVehicle( ) → void

Sell the borrowed vehicle she is driving to the fence. Returns ok, why, sous.

arrange(wardenId: string, deal: any) → void

Bribe a named Warden, or lean on him with a file. deal = { how = "bribe" | "leverage", weekday }.

argtypedescription
wardenIdstring
dealany

progress( ) → any

startMission(id: string) → boolean

argtypedescription
idstring

retryMission( ) → number

startActivity(id: string) → void

argtypedescription
idstring

choose(option: string) → boolean

Answer the decision the running mission or activity is waiting on.

argtypedescription
optionstring

rest(hour: number) → void

Pass time until an hour (at a safehouse). Colour comes back with the sleep.

argtypedescription
hournumber

signNow(self: any, siteId: string, audience: number) → void

argtypedescription
selfany
siteIdstring
audiencenumber

buildFacts(self: any, pf: any) → any

argtypedescription
selfany
pfany

facts( ) → any

The facts her missions see now (as of her last frame).

frame(dt: number, pf: any) → any

One tick for this player. `pf` is her frame (see logic.game). Returns her view.

argtypedescription
dtnumber
pfany

washed(amount: number, by: string?) → void

Solvent hit her (logic.game calls this for every "washed" outcome of gunplay).

argtypedescription
amountnumber
bystring?

dayPassed(day: number) → void

A day ended (logic.game calls this once per session at midnight).

argtypedescription
daynumber

serialise( ) → any

set(t: any) → void

argtypedescription
tany

restore(d: any) → void

argtypedescription
dany

unset(list: any) → any

argtypedescription
listany

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.