Block placement needs support; torches attach to blocks or walls #14

Closed
opened 2026-11-07 18:27:42 +00:00 by claude · 1 comment
Member

As in Terraria, a block may only be placed next to another solid block or in front of a background wall, so no floating blocks in open sky. Torches must touch a block or wall. Possibly add a wall-mounted torch variant.

As in Terraria, a block may only be placed next to another solid block or in front of a background wall, so no floating blocks in open sky. Torches must touch a block or wall. Possibly add a wall-mounted torch variant.
claude added this to the v0.2 Core Feel milestone 2026-11-07 18:27:42 +00:00
claude added the
priority
medium
type
feature
area/items-crafting
labels 2026-11-07 18:27:42 +00:00
eric added this to the Strata Roadmap project 2026-11-07 18:36:27 +00:00
eric moved this to To Do in Strata Roadmap on 2026-11-07 18:37:23 +00:00
eric closed this issue 2026-11-10 06:14:43 +00:00
Author
Member

Done in 208ea92.

What changed (mods/strata_core/placement.lua, documented in DESIGN.md §2)

  • A block a player places on the plane needs a supporting block left, right, above or below it, or a background wall behind it. Otherwise placement is refused and the item is kept. Platforms and doors count as support; torches don't.
  • Walls (z = 1) follow the same idea: they need a neighbouring wall, or a block on the plane in front of them or next to that cell.
  • Torches mount on the floor first, then a block on the left or right (new torch_left / torch_right nodes, a flat plate facing the camera with a leaning-torch texture), then a wall behind. Digging the support (including hammering the wall) drops the torch as an item.
  • Only player placement is checked. set_node from mods and mapgen is unrestricted, and blocks don't fall when their support is dug (as in Terraria).

Tests: 5 new selftest cases (support queries, block and wall placement, torch mounts and preference order, torch drops). 41/41 pass locally with zero ERROR lines; CI run 19767 is green (luacheck + selftest).

Needs a hands-on check in the client: the wall-torch plate's look and its selection box. A failed placement may also show a brief client-side flicker for blocks that use the default placement prediction.

Not done (possible follow-up): furniture (work bench, furnace, anvil, chest) doesn't yet require a floor under it. Doors already do.

Done in 208ea92. **What changed** (`mods/strata_core/placement.lua`, documented in DESIGN.md §2) - A block a player places on the plane needs a supporting block left, right, above or below it, or a background wall behind it. Otherwise placement is refused and the item is kept. Platforms and doors count as support; torches don't. - Walls (z = 1) follow the same idea: they need a neighbouring wall, or a block on the plane in front of them or next to that cell. - Torches mount on the floor first, then a block on the left or right (new `torch_left` / `torch_right` nodes, a flat plate facing the camera with a leaning-torch texture), then a wall behind. Digging the support (including hammering the wall) drops the torch as an item. - Only player placement is checked. `set_node` from mods and mapgen is unrestricted, and blocks don't fall when their support is dug (as in Terraria). **Tests**: 5 new selftest cases (support queries, block and wall placement, torch mounts and preference order, torch drops). 41/41 pass locally with zero ERROR lines; CI run 19767 is green (luacheck + selftest). **Needs a hands-on check in the client**: the wall-torch plate's look and its selection box. A failed placement may also show a brief client-side flicker for blocks that use the default placement prediction. **Not done (possible follow-up)**: furniture (work bench, furnace, anvil, chest) doesn't yet require a floor under it. Doors already do.
Sign in to join this conversation.