Skip to content

feat(maps): Building Interior generator#149

Merged
Daren9m merged 1 commit into
mainfrom
claude/map-buildings
Jul 20, 2026
Merged

feat(maps): Building Interior generator#149
Daren9m merged 1 commit into
mainfrom
claude/map-buildings

Conversation

@Daren9m

@Daren9m Daren9m commented Jul 20, 2026

Copy link
Copy Markdown
Owner

PR 2 of milestone #8 Map Layouts & Scale. Closes #146. Stacked on #148 (PR 1) — merge that first.

What changed

  • generateBuilding: a 2-ring shell encloses a floor plan that's optionally L-shaped (party wall + shorter wing; the dead corner returns to exterior mass). A recursive wall-line partition divides the interior — and because every cut separates exactly two regions, the split tree doubles as the connectivity spanning tree.
  • The bug TDD caught: punching each door during the split let a descendant wall land flush against its parent's door and seal a room (seed 14 reproduced it). Doors now punch in a second pass after all walls exist, only at positions open on both sides. The 15-seed every-room-reachable test locks it.
  • Furnishings & tags: hearth, sparse columns, one cellar stair, density-scaled traps/treasure; party spawns at the front door, the deepest room hosts the boss, the far half is hostile. Names scale with footprint: Townhouse → Manor Floor → Grand Hall.
  • Grim household pools: 'A meal was in progress. The knives are all accounted for except one.'
  • 'Building Interior' joins the Layout select on both pages; a tenth grid-freeze pin covers it.

Tests

6 new building tests with fallback-proof discriminators (house names, ≤1 stair, interior floor-dominance, household archetypes — the naive versions passed on the dungeon fallback and were sharpened until they failed properly). Full suite 663 passing; typecheck, lint, build clean. Verified on the static build: 16×12 Townhouse with Front Hall, Hearth, and Chapel Niche.

- generateBuilding: 2-ring shell, optional L-shaped plan (party wall +
  wing, dead corner returns to exterior mass), recursive wall-line
  partition where the split tree is the connectivity spanning tree
- Doors punch in a SECOND pass after every wall exists, at spots open
  on both sides — punching during the split let a child wall land
  flush against a parent's door and seal a room (caught by the seed-14
  connectivity test)
- Furnishings: hearth, sparse columns, cellar stair, density-scaled
  trap/treasure; scale-aware names (Townhouse/Manor Floor/Grand Hall)
- Household tagging: party at the front door, boss in the deepest
  room, far half hostile; grim household flavor pools (the knives are
  all accounted for except one)
- 'building' joins the Layout select on both pages; freeze pin added

Closes #146
Base automatically changed from claude/map-layouts to main July 20, 2026 02:55
@Daren9m
Daren9m merged commit 679b7fc into main Jul 20, 2026
1 check passed
@Daren9m
Daren9m deleted the claude/map-buildings branch July 20, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

maps: Building Interior generator

1 participant