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

fleet

The vehicles in Wren's life: her own van, whatever she has borrowed, and what

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

fleet

The vehicles in Wren's life: her own van, whatever she has borrowed, and what

stands in the garages.

Any vehicle in the city can be borrowed; only the van is hers and only the van keeps upgrades. A garage opens
in a district once its colour reaches Economy.garages.opensAt and holds ONE borrowed vehicle, with the paint
that was on it. This module is the bookkeeping: what she is driving, what is stored where, what each vehicle
looks like to a Warden (type, colour, plate), and what its type lets her do (content.vehicles).

  local Fleet = require("metropolisGame.logic.fleet")
  local fleet = Fleet.new(Vehicles, Economy.garages, hub?)       -- content.vehicles, content.economy.garages
  fleet:grantVan({ colour = "ochre", plate = "VR 0417" })         -- the van becomes hers (Borrowed Wheels)
  fleet:hasVan()
  fleet:board("car7", { type = "finch", colour = "blue", plate = "VR 1123", state = "parked" })
  -- she took the wheel of a vehicle: returns its record { id, type, colour, plate, owned, def }
  fleet:alight()                                   -- she got out (the vehicle stays known as `last`)
  fleet:driving()                                  -- the record she is at the wheel of, or nil
  fleet:type("car7")   fleet:def("finch")          -- a known vehicle's type; a type's content entry
  fleet:appearance()                               -- { ["vehicle.kind"], ["vehicle.colour"], ["vehicle.plate"] } while driving, else {}
  fleet:repaint("car7", "white")   fleet:replate("car7", "VR 9001")
  fleet:garages(colourOf)                          -- { { district, open, vehicle = record | nil } } district order
  fleet:store("old_quay", "car7", colourOf)        -- ok, why ("closed" | "full" | "own" | "unknown" | "driving")
  fleet:retrieve("old_quay")                       -- the record, out of the garage (the host spawns it), or nil
  fleet:forget("car7")                             -- abandoned for good, impounded or wrecked
  fleet:serialise()   fleet:restore(data)

Hub events: "boarded" { vehicle, type, owned }, "alighted" { vehicle }, "stored" { district, vehicle },
"retrieved" { district, vehicle }, "vanGranted" {}.

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.fleet — the vehicles in Wren's life: her own van, whatever she has borrowed, and what stands in the garages. Any vehicle in the city can be borrowed; only the van is hers and only the van keeps upgrades. A garage opens in a district once its colour reaches Economy.garages.opensAt and holds ONE borrowed vehicle, with the paint that was on it. This module is the bookkeeping: what she is driving, what is stored where, what each vehicle looks like to a Warden (type, colour, plate), and what its type lets her do (content.vehicles). local Fleet = require("metropolisGame.logic.fleet") local fleet = Fleet.new(Vehicles, Economy.garages, hub?) -- content.vehicles, content.economy.garages fleet:grantVan({ colour = "ochre", plate = "VR 0417" }) -- the van becomes hers (Borrowed Wheels) fleet:hasVan() fleet:board("car7", { type = "finch", colour = "blue", plate = "VR 1123", state = "parked" }) -- she took the wheel of a vehicle: returns its record { id, type, colour, plate, owned, def } fleet:alight() -- she got out (the vehicle stays known as `last`) fleet:driving() -- the record she is at the wheel of, or nil fleet:type("car7") fleet:def("finch") -- a known vehicle's type; a type's content entry fleet:appearance() -- { ["vehicle.kind"], ["vehicle.colour"], ["vehicle.plate"] } while driving, else {} fleet:repaint("car7", "white") fleet:replate("car7", "VR 9001") fleet:garages(colourOf) -- { { district, open, vehicle = record | nil } } district order fleet:store("old_quay", "car7", colourOf) -- ok, why ("closed" | "full" | "own" | "unknown" | "driving") fleet:retrieve("old_quay") -- the record, out of the garage (the host spawns it), or nil fleet:forget("car7") -- abandoned for good, impounded or wrecked fleet:serialise() fleet:restore(data) Hub events: "boarded" { vehicle, type, owned }, "alighted" { vehicle }, "stored" { district, vehicle }, "retrieved" { district, vehicle }, "vanGranted" {}.

new(vehicles: any, garages: any, hub: any?) → any

argtypedescription
vehiclesany
garagesany
hubany?

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

argtypedescription
selfany
namestring
payloadany

def(type_: string) → any

A vehicle type's content entry.

argtypedescription
type_string

grantVan(look: any) → void

The van becomes Wren's. `look` = { colour, plate }.

argtypedescription
lookany

hasVan( ) → boolean

board(id: string, info: any) → any

She took the wheel. Returns the vehicle's record.

argtypedescription
idstring
infoany

alight( ) → void

driving( ) → any

record(id: string) → any

argtypedescription
idstring

type(id: string) → string

argtypedescription
idstring

appearance( ) → any

What a Warden would describe while she is at the wheel.

repaint(id: string, colour: string) → boolean

argtypedescription
idstring
colourstring

replate(id: string, plate: string) → boolean

argtypedescription
idstring
platestring

garages(colourOf: (string) → void

Every district's garage: whether it is open at that district's colour, and what stands in it.

argtypedescription
colourOf(string

store(district: string, id: string, colourOf: (string) → void

Put a borrowed vehicle in a district's garage. Returns ok, why.

argtypedescription
districtstring
idstring
colourOf(string

retrieve(district: string) → any

Take the vehicle out of a district's garage. Returns its record (with `extra` as stored), or nil.

argtypedescription
districtstring

forget(id: string) → void

A vehicle is gone for good (abandoned, impounded, wrecked). The van cannot be forgotten, only impounded.

argtypedescription
idstring

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.