First Light
README.md
firstlight.sites
Everything the survivor can take, and where. Attached to the Sites anchor
by the scene build. It places the props, registers each with
firstlight.interact, raycasts from the player's camera every frame so
Interact.current() names what the reticle is on, answers the interact and
headlamp keys, and drains lamp oil and batteries into Rules.state.stores.
What it places
All of it as temporary children (never saved into the scene), rebuilt on every load from the counts kept on the blackboard:
| Where | Props | Interaction |
|---|---|---|
workshop | a crate of tins, a stack of scrap timber, a bench with a matchbox, the ice drill | take tins ×3, timber ×4, matches ×6, the drill |
generator | the engine block, two jerry cans, three coils of copper wire | oil residue ×2 (0.5 L each), wire ×3 |
radio_hut | the battery bank, the radio desk, a matchbox | batteries ×3, matches ×4 |
storage | a half-buried crate and salvage planks at the heap's edge | tins ×4, timber ×3 |
living_hut | the hanging lantern and its point light; the snowed-over food cache outside the door | light / snuff the lamp; cache fish and meat outside, bring it back in |
fishing_hole | a cleared ice patch, the hole once drilled, a flag stake | drill the hole (needs the drill), then cast — castsPerDay casts a day at fishChance |
trap_line | three traps along the hare runs, a flag stake | set the traps; check them from the next day at trapChance for meat |
river | the black ice of the frozen river between its banks | landmark |
driftwood | a heap of logs, a flag stake | gather once a day: fuel +4 |
coal_seam | the outcrop and a heap of coal, a flag stake | dig once a day: fuel +6 |
wreck | the listing hull and the ship's stores crate | one search: tins +5, oil +2, batteries +2, matches +10, wire +2 |
caribou | the carcass, from stores.caribouDay until butchered | butcher: meat +10 |
A generated model under /firstlight/sites/<name>.bundle (ice_drill,
tin_crate, jerry_can, battery_bank, lantern, fox_trap, driftwood,
coal, wreck, caribou) is used when it resolves and fitted to size on
its first frame; otherwise the prop is built from primitives and the
materials beside it.
The stove and the bunk
The body slice spawns stove and bunk under living_hut. Once a second
this component looks for them, fits an interact_hit box to each, and
registers them: the stove lights through firstlight.stove:light() and
cycles low/high through :setLevel(n); the bunk sleeps through
firstlight.hut:sleep().
The headlamp
A SpotLight child named headlamp on the player's camera rig. F (the
headlamp control of firstlight.sites.outings) toggles it. Switching on
with an empty lamp takes a battery from stores.batteries and fills
stores.headlampCharge; it drains over headlampBatterySeconds real seconds
and changes to a fresh battery by itself, or dies when there are none.
Fields
| Field | Default | Meaning |
|---|---|---|
walkMap | @builtin::inputMaps.default | the scheme whose interact control is used |
outingsMap | firstlight.sites.outings | the headlamp switch |
headlampBatterySeconds | 240 | real seconds one battery lasts |
lampOilPerHour | 0.05 | litres the hut lamp burns per in-game hour |
fishChance | 0.45 | chance a cast lands a fish |
trapChance | 0.55 | chance the traps hold something the next morning |
castsPerDay | 5 | casts before the fish stop biting for the day |
Every use emits interact { site, action } and a say line; every store
change goes through firstlight.stores and emits stores.