A door that is 1 wide and 3 tall, opens on right-click, and toggles between blocking and walk-through. NPCs and housing will need it later.
A wooden chest with a 40-slot inventory formspec, opened by right-click within reach.
Both need recipes at the Work Bench.
- A door that is 1 wide and 3 tall, opens on right-click, and toggles between blocking and walk-through. NPCs and housing will need it later.
- A wooden chest with a 40-slot inventory formspec, opened by right-click within reach.
Both need recipes at the Work Bench.
claude
added this to the v0.2 Core Feel milestone 2026-11-07 18:27:42 +00:00
strata.register_door(name, def): a door item plus one node per cell (<door>_<open|closed>_<0..2>). Placing needs solid ground below and three free, reachable cells on the plane. Right-clicking any cell within reach toggles the whole door. Closed blocks movement; open is a thin walk-through panel at the cell's edge. A door won't close on an avatar or creature. Digging any cell removes the others and drops one door. All cells carry group door for the housing validator later.
strata.register_chest(name, def): 40-slot node inventory, right-click formspec with the chest and player inventories plus listring (shift-click moves). It can't be dug while it holds items. Inventory moves are reach-checked through is_protected.
Content: Wooden Door (6 wood) and Wooden Chest (8 wood + 2 iron bars), both at the Work Bench. Placeholder textures come from tools/gen_textures.py.
Tests: door placement (3 tall, item consumed), refusal in mid-air, under a block and off the plane; right-click/toggle open and close and walkability; refusing to close on an avatar; digging the middle cell removes all three; chest size, can_dig when empty vs full, formspec lists and listring; recipes. 29/29 pass, 0 ERROR.
Follow-ups: doors don't auto-open when you walk into them (Terraria does this); that's now #67. The chest has no lock or ownership, which is fine for singleplayer and co-op for now.
Done in 4f4fcda.
**What changed** (`mods/strata_core/furniture.lua`)
- `strata.register_door(name, def)`: a door item plus one node per cell (`<door>_<open|closed>_<0..2>`). Placing needs solid ground below and three free, reachable cells on the plane. Right-clicking any cell within reach toggles the whole door. Closed blocks movement; open is a thin walk-through panel at the cell's edge. A door **won't close on an avatar or creature**. Digging any cell removes the others and drops one door. All cells carry group `door` for the housing validator later.
- `strata.register_chest(name, def)`: 40-slot node inventory, right-click formspec with the chest and player inventories plus `listring` (shift-click moves). It can't be dug while it holds items. Inventory moves are reach-checked through `is_protected`.
- Content: Wooden Door (6 wood) and Wooden Chest (8 wood + 2 iron bars), both at the Work Bench. Placeholder textures come from `tools/gen_textures.py`.
**Tests**: door placement (3 tall, item consumed), refusal in mid-air, under a block and off the plane; right-click/toggle open and close and walkability; refusing to close on an avatar; digging the middle cell removes all three; chest size, can_dig when empty vs full, formspec lists and listring; recipes. 29/29 pass, 0 ERROR.
**Follow-ups**: doors don't auto-open when you walk into them (Terraria does this); that's now #67. The chest has no lock or ownership, which is fine for singleplayer and co-op for now.
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.
Both need recipes at the Work Bench.
Done in
4f4fcda.What changed (
mods/strata_core/furniture.lua)strata.register_door(name, def): a door item plus one node per cell (<door>_<open|closed>_<0..2>). Placing needs solid ground below and three free, reachable cells on the plane. Right-clicking any cell within reach toggles the whole door. Closed blocks movement; open is a thin walk-through panel at the cell's edge. A door won't close on an avatar or creature. Digging any cell removes the others and drops one door. All cells carry groupdoorfor the housing validator later.strata.register_chest(name, def): 40-slot node inventory, right-click formspec with the chest and player inventories pluslistring(shift-click moves). It can't be dug while it holds items. Inventory moves are reach-checked throughis_protected.tools/gen_textures.py.Tests: door placement (3 tall, item consumed), refusal in mid-air, under a block and off the plane; right-click/toggle open and close and walkability; refusing to close on an avatar; digging the middle cell removes all three; chest size, can_dig when empty vs full, formspec lists and listring; recipes. 29/29 pass, 0 ERROR.
Follow-ups: doors don't auto-open when you walk into them (Terraria does this); that's now #67. The chest has no lock or ownership, which is fine for singleplayer and co-op for now.