▣
module · drop-in viewer
legacy
What the world remembers of a survivor. `require("firstlight.legacy")`.
by·posted 1mo ago
What it does
firstlight.legacy
What the world remembers of a survivor. require("firstlight.legacy").
Legacy.note(text)— add a line to the current day's journal entry (deduplicated). Any slice may call it for a notable event.Legacy.journalLine(day)— the line forday: clock, weather words, stove, stores, frostbite, the bear, the notes.Legacy.recordDay(day)— append that line toRules.state.journal.Legacy.die(cause, day?, emitted?)— end the run:run.alive = false,run.deaths += 1, the last journal line, the cache (a quarter of every store, onRules.state.run.cache), the save. Emitsdeath { cause, day }unlessemittedsays the event is already on the bus. Returns false when the run was already over.Legacy.newRun()— the next run from the death screen. Resets body, clock and stores to the start values plus the cache; keeps journal, seed, deaths,hut.gapsandstores.holeDrilled. EmitsnewRun { deaths, cache }.Legacy.cache()— the cache the last survivor left, or nil.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.