core
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
core
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/core.module — the shared spine of "Red String Over the Atlantic". Every slice of the build codes against THIS file and never edits it. It holds the constants (palette, typography, screen names, stations, legs), the session state, the event bus, the slice registry, the art-path contract and a small camera primitive. It holds no case content and no verifier — those are rs_rules' job — and it draws nothing. local Core = require("game.core")
station(id: ?) → void
| arg | type | description |
|---|---|---|
| id | ? |
leg(i: ?) → void
| arg | type | description |
|---|---|---|
| i | ? |
on(event: ?, fn: ?) → void
Subscribe to an event. Returns a function that unsubscribes.
| arg | type | description |
|---|---|---|
| event | ? | |
| fn | ? |
emit(event: ?, payload: ?) → void
Fire an event. A throwing handler is logged and does not stop the others.
| arg | type | description |
|---|---|---|
| event | ? | |
| payload | ? |
setPhase(p: ?) → void
| arg | type | description |
|---|---|---|
| p | ? |
setStation(id: ?) → void
| arg | type | description |
|---|---|---|
| id | ? |
setLeg(i: ?) → void
| arg | type | description |
|---|---|---|
| i | ? |
spendAction(n: ?) → void
| arg | type | description |
|---|---|---|
| n | ? |
holds(cardId: ?) → void
| arg | type | description |
|---|---|---|
| cardId | ? |
gain(cardId: ?) → void
| arg | type | description |
|---|---|---|
| cardId | ? |
toast(text: ?, tone: ?) → void
| arg | type | description |
|---|---|---|
| text | ? | |
| tone | ? |
reset( ) → void
provide(name: ?, api: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| api | ? |
need(name: ?) → void
Read a slice's API, or nil while that slice has not landed yet. Never assume it is there at require time — take it at call time, or wait for Core.EV.provide.
| arg | type | description |
|---|---|---|
| name | ? |
evidence(cardId: ?) → void
A piece of evidence's face: photograph, telegram flimsy, typed page.
| arg | type | description |
|---|---|---|
| cardId | ? |
portrait(personId: ?) → void
A passenger's photograph, for the board and the interview screen.
| arg | type | description |
|---|---|---|
| personId | ? |
plate(name: ?) → void
A named prop image (deck plan, ship's crest, title plate).
| arg | type | description |
|---|---|---|
| name | ? |
hasArt(name: ?) → void
True when a texture asset by that name actually exists in the world. Every art lookup goes through this so a missing image is a fallback, never a crash.
| arg | type | description |
|---|---|---|
| name | ? |
id( ) → void
The id of the camera the local player is looking through. In play this is the clone of the prototype's CameraRig — the engine makes one per user, and `role == "main"` is how it names the one THIS client sees. In edit, where no player has spawned, it falls back to the editor camera so a station can still be framed while authoring.
rig( ) → void
The camera as an entity proxy, or nil when there is none yet.
snapTo(pos: ?, look: ?) → void
Put the camera at a world point, looking at another world point. A camera's pose IS its entity transform; `camera.set` is for the lens.
| arg | type | description |
|---|---|---|
| pos | ? | |
| look | ? |
lens(params: ?) → void
Change the lens without moving the camera (fov, near, far, renderLayers).
| arg | type | description |
|---|---|---|
| params | ? |
toStation(id: ?) → void
Put the camera on a station.
| arg | type | description |
|---|---|---|
| id | ? |
glide(pos: ?, look: ?, seconds: ?, easing: ?) → void
Move the camera from where it is to `pos`/`look` over `seconds`. Returns a handle with :cancel(). rs_staging builds its shots on this.
| arg | type | description |
|---|---|---|
| pos | ? | |
| look | ? | |
| seconds | ? | |
| easing | ? |
log(...: ?) → void
| arg | type | description |
|---|---|---|
| ... | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.