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/init.luau THE HOUSE THAT REMEMBERS — the game's one shared module. This is the contract the whole game is built against: the constants, the house as numbers, the rules, the shared runtime state, the bus, and the registry the slices announce themselves through. IT IS THE ONLY INTERFACE BETWEEN SLICES. No slice requires another slice's module — every slice requires `game.core` and talks through it. That is what lets five slices be written at the same time, in one world, without knowing whether the others have landed yet. Read `design/spec.md` beside this file.
on(event: string, fn: (...any) → void
Subscribe to a named event. Returns an unsubscribe function.
| arg | type | description |
|---|---|---|
| event | string | |
| fn | (...any |
emit(event: string, payload: any) → void
Announce something. A handler that throws does not stop the others.
| arg | type | description |
|---|---|---|
| event | string | |
| payload | any |
provide(name: string, api: table) → void
| arg | type | description |
|---|---|---|
| name | string | |
| api | table |
get(name: string) → any
| arg | type | description |
|---|---|---|
| name | string |
roomAt(x: number, y: number, z: number) → void
Small shared helpers Find the room a world position is standing in. Falls back to the nearest room on that floor, so a doorway or a threshold still answers.
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number |
roomCentre(id: string, lift: number?) → void
Centre of a room, at standing height.
| arg | type | description |
|---|---|---|
| id | string | |
| lift | number? |
objective( ) → void
The live SEQUENCE entry.
past(step: string) → boolean
Is `step` at or past where the game is now? Lets a slice ask "has the player got to this point yet" without hard-coding an order.
| arg | type | description |
|---|---|---|
| step | string |
advanceTo(step: string) → void
Move the game on. Only ever forward.
| arg | type | description |
|---|---|---|
| step | string |
say(text: string, seconds: number?) → void
Put a line of narration on the screen for a few seconds. The UI slice subscribes to `narration`; a slice that wants to speak calls this.
| arg | type | description |
|---|---|---|
| text | string | |
| seconds | number? |
give(item: string) → void
What the player is carrying.
| arg | type | description |
|---|---|---|
| item | string |
has(item: string) → boolean
| arg | type | description |
|---|---|---|
| item | string |
remembered(anchor: string) → boolean
Has this memory been entered at least once?
| arg | type | description |
|---|---|---|
| anchor | string |
registerInteractable(spec: table) → void
| arg | type | description |
|---|---|---|
| spec | table |
unregisterInteractable(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
interactable(id: string) → any
| arg | type | description |
|---|---|---|
| id | string |
interactableUsable(spec: table) → boolean
Can it be used right now? A spec with no gate is always usable.
| arg | type | description |
|---|---|---|
| spec | table |
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.