shell
The `shell` slice's one hook into the scene. It puts `RunDirector` on the scene's `director` entity and gets out of the way — everything the run does lives in that component.
wiring/shell
The shell slice's one hook into the scene. It puts RunDirector on the
scene's director entity and gets out of the way — everything the run does
lives in that component.
attach.directordeclaresRunDirectorso a scene rebuild bakes it in.onSceneReady(ctx)adds it at runtime as well, guarded on the component already being present, because the far more common case is a scene that is already built and will never bake anything.
The fields it attaches with: dockRadius = 9 (metres from the cargo maw
that count as docked for the win check) and previewInEdit = false (the
instrument layer stays off the glass while authoring, so another slice's
viewport capture is not covered by a HUD it did not ask for).
Everything the rest of the game needs from shell is in game.rules: it
writes state.phase, o2, integrity, banked, instability and
cutsMade, emits phase(newPhase) and instability(level), and consumes
severed, deposited and impact.
Scoped to this part · feeds back into the world's score.