Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part oftoolbox rainlineTest.toolbox·originates fromworld a333e7c2-f…

shared

Result envelopes and the scene readers that snapshot and remoteActivity both use.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 1mo ago
What it does

Result envelopes and the scene readers that snapshot and remoteActivity both use.

Interface

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

conforms to

zero/source-extract/v2

Shared Module Cross-tool helpers for rainlineTest: the result envelope, and the scene readers more than one tool needs. Every entity read here is guarded. Entities in this world are despawned and respawned constantly -- stage swaps, race restarts, peers arriving -- and a handle read a frame after it was found will raise. A bench that throws while reporting the state is worse than one that reports less: it tells you nothing and loses the run.

ok(value: any?, formatted: string?) → ToolResult

Build a success result.

argtypedescription
valueany?Optional payload returned to the caller.
formattedstring?Optional human-readable stdout string.

examples

return shared.ok({ peer = 6 }, "one peer")

fail(message: string, exitCode: number?) → ToolResult

Build a failure result.

argtypedescription
messagestringHuman-readable failure reason.
exitCodenumber?Optional non-zero exit code; 2 for argument errors.

examples

return shared.fail("no race in this scene", 1)

safe(fn: (() →

Read something from a live entity, answering nil instead of raising when the entity has gone. Every read in this bench goes through here.

argtypedescription
fn((The read to attempt.

examples

local p = shared.safe(function() return e.transform.position end)

mine(e: any) → boolean

Whether this peer owns an entity.

argtypedescription
eanyThe entity ref to ask about.

examples

if shared.mine(car) then end

owner(e: any) → number

The owning peer id of an entity, or -1 when it cannot be read.

argtypedescription
eanyThe entity ref to ask about.

examples

local who = shared.owner(car)

profile( ) → string

Which profile this peer runs under, read from its relay room keys. A room key is `{worldGuid}/{profile}/{mode}/{sceneGuid}` and the profile segment keeps a runtime peer and an editor peer in separate rooms on purpose: they never see each other, and a runtime peer runs the last PUSHED commit rather than the working copy. The scene segment matters just as much: peers with different scenes loaded are in different rooms, so a peer in a menu cannot see one in a race.

examples

if shared.profile() ~= "editor" then end

obeyedRaceId( ) → string

The race this peer's own Race component decided to obey, by id. The component records it after its `mine()` gate passes, so this is the game's own answer rather than an inference from the screen.

examples

local id = shared.obeyedRaceId()

playState( ) → any

What the engine is doing right now.

examples

local run = shared.playState()

needsPlay(what: string) → ToolResult

A failure envelope when the world is not simulating, nil when it is.

argtypedescription
whatstringThe reading the caller was about to take, named in the message.

examples

local stop = shared.needsPlay("a verdict") if stop then return stop end

races( ) →

Every Race component in the scene. An entity that vanishes mid-read is skipped rather than raising.

examples

local races = shared.races()

obeyedRace( ) → any

The race this peer obeys, as a record, or nil.

examples

local r = shared.obeyedRace()

cars(rosterText: string?) →

Every car in the scene, with what explains how it is drawn and driven.

argtypedescription
rosterTextstring?Optional roster string; cars in it are marked seated.

examples

local cars = shared.cars(race.roster)

screens( ) →

Every registered screen and whether it is visible.

examples

local s = shared.screens()

screenVisible(name: string) → boolean

Whether a named screen is registered and visible right now.

argtypedescription
namestringThe screen's name.

examples

if shared.screenVisible("rainline_circuits") then end

where( ) → string

The screen a player is looking at, named plainly. (the singleplayer track select), "racing", or "none".

examples

local where = shared.where()
⌬ Types
ToolResult = {

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

19+items
▣
module · born here
❒asset
# shared One-paragraph description of what this module provides and who consumes it. ## Exports - `M.exampleFn(arg) -> result` — what it does and when to call it. - `M.exampleValue: type` — what value it carries. ## Usage Replace `<identity>` with the string `asset.create` returned — this module's source path with `/` written as `.` and each segment's type suffix dropped, the way a module at `/source/lib/thing.module` is `lib.thing` and one at `/source/kit.package/thing.module` is `kit.thing`. ```luau local M = require("<identity>") M.exampleFn("foo") ``` ## Notes - Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.
▲ 0↑ born
◇
component · born here
❒asset
# RAINLINE car visual Attach to gameplay car body at tire contact y0. Generates one temporary child with the real image-derived endurance car mesh and PBR material. Nose points +Z; normalized length4.8m, width1.976m, height1.033m. variant0 ivory/citron hero,1 blue,2 red,3 graphite. Cleanup re-derives owned child on hot reload. Gameplay owns motion, guns, authority and input.
▲ 0↑ born
◇
component · born here
❒asset
# Car First Light owner-driven arcade car. Space drifts recharge the shared battery; Shift boost and focused headlights consume it. Narrow forward light exposure drains rivals' battery and hull, with road/car occlusion. Hosts run bots with delayed aiming and limited attack bursts. Wrecks launch, tumble, bounce and recover. Motion, battery, focus, damage, crash angles and grid state are Sync fields. Keyboard, gamepad and touch use the native drive input map. The native player avatar owns human motion; prototype-only bodies are excluded from gameplay registration.
▲ 0↑ born
◇
component · born here
❒asset
Host-only three-rival race lifecycle. Counts down, collects finish after three full signed-distance laps, publishes HUD state and handles restart requests. Mount on the world root; never on the player prototype.
▲ 0↑ born

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.