Status: done (2026-11-24) Priority: 2 Size: M Design ref: docs/ui2/HANDOFF.md; design.md, The player and what they see (Needs and dark); src/sim/player.js; src/sim/mood.js; src/sim/hunger.js (the health event) Goal: The hours of a day are scarce for a player who plans by hand: working a night is a choice with a cost. Acceptance criteria:
st.player or where target-v2 section 4 places it, with an @state line and its owner in src/owners.json). Each game hour awake adds need / (24 - need) hours (need 8: half an hour), each hour asleep takes one off, never under 0, capped. Asleep: indoors where it sleeps (its house, its booth, or its bed under the open sky before the booth stands; VB-1544) with no act in hand, or under the sleep verb. The values are one @tunable SLEEP.sleep the player may queue (register, sim/commands; source player): the pawn leaves the job in hand (which keeps its progress), goes to where it sleeps and sleeps until args.until (an hour of the day; by default the start of work) or for args.hours; the command lasts until then, and the next in the queue is begun after it. Refused with its reason for the dead or one with no place to sleep.tired (sim/mood, read from the state like hungry): nothing under a small allowance of hours owed, then by the hours owed, to a cap; a whole night lost is felt clearly (about as hungry is). Health: a smaller cost, only once a whole night or more is owed, at the day’s health reckoning (the health event’s why gains a term the page can show).Sim facade: the hours owed, whether asleep, and the mood and health terms now.node tools/same.js --base REF on founders and solo. Unplayed pawns do not sleep by this rule yet: note it as an act only the player has (inbox act), with a follow-up task for every pawn if the cost allows (docs/cost.md).tests/sleep.js on a small constructed state, in tests/suites.js: the hours owed rise awake and fall asleep; the verb sleeps until its hour and the queue goes on; a night worked lowers mood by the tunable; health is touched only past the threshold; a save and a load keep the state; tests/mood.js, tests/saves.js, tests/plaindata.js and tests/commands.js pass.src/sim/agenda.js); both add a line to src/sim.js and src/manifest.json.st.player.sleep {owed, asleep, at}, kept by sim/player once a step (at: playerStep is also called outside the clock, tests/outcomes.js); SLEEP, its terms and the page’s read Sim.sleepOf in a new sim/sleep (material layer, beside thirst, loaded before mood and hunger, which read it; sim/rules is at its width).sources: ['player']: no pawn’s own logic sleeps by it yet (inbox act; follow-up VB-1645).why gains tired, “lack of sleep” on the sheet.bed) with no job, walk, phase or occasion: a played pawn idle at home in the day also sleeps, as the criterion reads.