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

state

This module manages the frame-by-frame state of every active Metropolis vehicle on a given peer. It registers dressed vehicles (added by `metropolisVehicles.resolver`) and updates their visual properties, such as lamps, steering wheel angles, scooter leans, and wear (damage, dirt…

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

state

This module manages the frame-by-frame state of every active Metropolis vehicle on a given peer. It registers dressed vehicles (added by metropolisVehicles.resolver) and updates their visual properties, such as lamps, steering wheel angles, scooter leans, and wear (damage, dirt, paint on glass). The module also handles the ink list for painterly rendering. It synchronizes vehicle state across peers by reading and writing replicated named values (pm.show for lamps, pm.wear for damage/dirt) on the vehicle's owner. It also provides hooks for game-layer events like crashes and tire marks. This module is called once per frame by the VehicleSystem component to ensure consistent and dynamic vehicle appearance and behavior.

Interface

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

conforms to

zero/source-extract/v2

nonstrict

has(bits: number, bit: number) → boolean

argtypedescription
bitsnumber
bitnumber

num(e: any, name: string, default: number) → number

argtypedescription
eany
namestring
defaultnumber

isOwner(e: any) → boolean

argtypedescription
eany

add(st: any) → void

Registers a dressed vehicle (the resolver calls it).

argtypedescription
stany

of(root: any) → any

The state of a vehicle root (entity or id), or nil.

argtypedescription
rootany

all( ) → void

Every registered vehicle state.

request(root: any, name: string, value: number) → boolean

Ask the owner for something: name = "beacon" | "signal" | "cover" | "coverColor" | "slick" | "damage" | "dirt".

argtypedescription
rootany
namestring
valuenumber

declare(st: any) → void

argtypedescription
stany

vehicleOf(e: any) → any

argtypedescription
eany

decide(st: any, dt: number, night: number) → number

What the lamps should show, decided by the owner.

argtypedescription
stany
dtnumber
nightnumber

show(st: any, bits: number, dt: number) → void

argtypedescription
stany
bitsnumber
dtnumber

yawQ(a: number) → void

argtypedescription
anumber

animate(st: any, dt: number) → void

argtypedescription
stany
dtnumber

update(dt: number) → void

Once a frame: lamps, steering wheels, leans, wear and ink of every vehicle this peer draws.

argtypedescription
dtnumber

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.