▣
module · drop-in viewer
What it does
game.core
The one table every slice of First Light: Lucina reads.
local Core = require("game.core")
| What | Where |
|---|---|
| The plate grid, cell ↔ world conversions | Core.GRID, Core.PLATE, Core.cellToWorld, Core.worldToCell, Core.cellIndex |
| The five piece shapes and the placement rules | Core.SHAPES, Core.SHAPE_ORDER, Core.footprint, Core.canPlace, Core.pieceAt |
| The exposure and dose numbers | Core.EXPOSURE, Core.DOSE |
| The phases and the level shape | Core.PHASES, Core.LEVEL_COUNT, the Level type |
| The live game state, held across hot reloads | Core.state — the State type says which slice writes each field |
| The signal bus | Core.on(name, fn), Core.off, Core.emit(name, ...) — the signal list and its senders are in the source |
| The three shorthands | Core.request(action), Core.sfx(name, opts?), Core.say(lineId) |
| Which component mounts where | Core.MOUNTS, Core.mount() — the scene entrypoint calls it on every load |
Subscribe in awake, subscribe again from onModuleReload (a duplicate is
dropped), release in onDestroy. The rules of the game are stated in
design/spec.md; this module carries the numbers and the shapes they share.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.