Follow-up from #13. Doors currently only open on right-click. Walking into a closed door should open it (and optionally close it behind you after a delay if nothing is in its cells), so moving through a base doesn't need aiming.
Sketch: in the avatar step, if horizontal input is held and the cell in front of the avatar (at feet and body height) is a closed door node, call strata.set_door(pos, true). Creatures must not open doors (later NPCs may). Add a selftest using the avatar _test_ctrl hook.
Follow-up from #13. Doors currently only open on right-click. Walking into a closed door should open it (and optionally close it behind you after a delay if nothing is in its cells), so moving through a base doesn't need aiming.
Sketch: in the avatar step, if horizontal input is held and the cell in front of the avatar (at feet and body height) is a closed `door` node, call `strata.set_door(pos, true)`. Creatures must not open doors (later NPCs may). Add a selftest using the avatar `_test_ctrl` hook.
claude
added this to the v0.2 Core Feel milestone 2026-11-08 06:18:04 +00:00
strata.open_door_ahead(pos, dir, half_width, half_height) in furniture.lua checks the cells just ahead of a walking entity, from feet to head height, and opens a closed door there. The avatar calls it while a walk key is held. Creatures don't call it, so slimes can't get in. Doors don't close by themselves; I left auto-close out, since closing behind you while something follows could trap it in the door cells (set_door already refuses to close on an entity).
Tests: a new furniture case: an avatar walking right opens a placed door and passes through; standing still, facing away or being too far doesn't open it. Removing the call from the avatar fails the case. Full suite 66/66, zero ERROR lines.
Done in 9e8284b.
`strata.open_door_ahead(pos, dir, half_width, half_height)` in `furniture.lua` checks the cells just ahead of a walking entity, from feet to head height, and opens a closed door there. The avatar calls it while a walk key is held. Creatures don't call it, so slimes can't get in. Doors don't close by themselves; I left auto-close out, since closing behind you while something follows could trap it in the door cells (`set_door` already refuses to close on an entity).
**Tests**: a new furniture case: an avatar walking right opens a placed door and passes through; standing still, facing away or being too far doesn't open it. Removing the call from the avatar fails the case. Full suite 66/66, zero ERROR lines.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up from #13. Doors currently only open on right-click. Walking into a closed door should open it (and optionally close it behind you after a delay if nothing is in its cells), so moving through a base doesn't need aiming.
Sketch: in the avatar step, if horizontal input is held and the cell in front of the avatar (at feet and body height) is a closed
doornode, callstrata.set_door(pos, true). Creatures must not open doors (later NPCs may). Add a selftest using the avatar_test_ctrlhook.Done in
9e8284b.strata.open_door_ahead(pos, dir, half_width, half_height)infurniture.luachecks the cells just ahead of a walking entity, from feet to head height, and opens a closed door there. The avatar calls it while a walk key is held. Creatures don't call it, so slimes can't get in. Doors don't close by themselves; I left auto-close out, since closing behind you while something follows could trap it in the door cells (set_dooralready refuses to close on an entity).Tests: a new furniture case: an avatar walking right opens a placed door and passes through; standing still, facing away or being too far doesn't open it. Removing the call from the avatar fails the case. Full suite 66/66, zero ERROR lines.