Log inGet started
World

First Light

Branchmain
Branchesmain
Commit5b1bfa8dc1

README.md

firstlight.hut

The living hut as a place to stay alive in. Attached to living_hut by the scene build. At awake it spawns the interior as temporary children under fl_hut_interior: the bunk along the west wall, the table and stool against the east wall with the barometer and thermometer above them, two rafters under the roof, the lamp bracket and lamp on the north wall — and, once a survivor has died here, the roof cache (fl_roof_cache), a canvas bundle roped to the east rafter holding a quarter of their stores.

What it runs

Rules.state.hut.insideC settles toward

airC + (shelterC + stoveHeat * stoveC) / (1 + gaps * (0.35 + 0.02 * windMs))

capped at maxInsideC, with the lag of a timber room. Unpatched wind gaps (Rules.state.hut.gaps, starting at Rules.HUT_GAPS_START) are what let the stove's warmth out; a patched gap outlasts the run.

Methods (call with a colon on entity.find("living_hut").component.get("hut"))

MethodDoesReturns
hut:sleep()Sleep in the bunk until 07:00 tomorrow (Rules.sleepToMorning()). Refused while the hut is below -25 C with the stove cold. The night burns fuel and warms or chills the body by the hut's warmth.HUD line (string)
hut:patchGap()Patches one wind gap; persists across runs.gaps still open (number)
hut:state(){ insideC, gaps, targetC, cache }table
hut:bunkPosition()Hut-local position of the bunk, for the prompt.{ x, y, z }

Fields

  • shelterC (12) — degrees the hut rises above the air on shelter alone.
  • stoveC (75) — degrees a high burn adds in a tight hut before gap losses.
  • maxInsideC (26) — the warmest the hut gets.