Phase 1: Woodcutting end to end, and the bank #77
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One skill built end to end, plus the container that makes any skill playable.
Woodcutting, chosen for needing the fewest new mechanisms: locs, loc swap
over the zone packets and timed restore are all what doors already do, and the
animation, the inventory add, the XP grant, the level-up announcement and the
ground-item fallback are all built and tested.
So the skill is not what this phase is for. It builds three things that every
later skill then reuses:
The skilling loop. A repeating action with a per-tick success roll, held by
a timer, interrupted by the documented set — the first consumer of
World.Queue/World.Timersthat is content rather than engine. Getting theinterruption set right here is worth more than the skill is: every later skill
inherits it, and a wrong one is only visible as "the action sometimes keeps
going after you walk away".
Contract.Skilling. Level, tool, room, and is the target still there.Ordered gates, one test per gate, with the expensive fact arriving as a
zero-arity thunk and a test asserting the thunk is not called when a cheaper
gate refuses first.
The bank. Twenty-eight slots is the real ceiling on a skill being playable,
and this is the phase that hits it. Inv 95 = 800 slots is already asserted
from the cache,
World.Containeris the pure core, the diff-against-last-encodedsync already exists and the four container opcodes are byte-exact in doctests.
What is missing is the interface binding and the deposit/withdraw ops — and,
unlike the backpack's if1 component, the encoders have taken a component
parameter since equipment landed, so binding a second container is a caller
decision rather than a protocol one.
Done when a player can chop, bank, and level up, with the tree stumping and
respawning for everyone watching it — the last clause being the one that
exercises the per-viewer diff rather than a push.