Skip to content

feat(structures): add tombstone and wind turbine schematics#1133

Open
louis-e wants to merge 3 commits into
mainfrom
feat/osm-tombstones-windturbine
Open

feat(structures): add tombstone and wind turbine schematics#1133
louis-e wants to merge 3 commits into
mainfrom
feat/osm-tombstones-windturbine

Conversation

@louis-e

@louis-e louis-e commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Scatter 11 bundled tombstone models across cemeteries: small headstones on a fine grid, rare large crypts on a coarse grid. Replaces the old procedural graves and keeps the flower scatter. Tombstones skip water and roads by reusing the existing land-cover and road-mask data.

Place a bundled wind turbine at power=generator generator:source=wind nodes and areas, anchored at the foundation so the wide rotor stays inside the tile halo.

Swap the place_structure debug-only size assert for a runtime extent-from-anchor guard, so oversized models skip instead of clipping.

Bump schematic tree pack base_spacing by one per scale band; those canopies are much wider than the old procedural trees.

Scatter 11 bundled tombstone models across cemeteries: small headstones
on a fine grid, rare large crypts on a coarse grid. Replaces the old
procedural graves and keeps the flower scatter. Tombstones skip water and
roads by reusing the existing land-cover and road-mask data.

Place a bundled wind turbine at power=generator generator:source=wind
nodes and areas, anchored at the foundation so the wide rotor stays inside
the tile halo.

Swap the place_structure debug-only size assert for a runtime
extent-from-anchor guard, so oversized models skip instead of clipping.

Bump schematic tree pack base_spacing by one per scale band; those
canopies are much wider than the old procedural trees.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 29, 2026 20:14
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

⏱️ Benchmark run finished in 0m 50s
🏗️ Generation time: 19s (excl. data fetching)
🧠 Peak memory usage: 1060 MB (↗ 5% more)

📈 Compared against baseline: 18s time, 1005 MB memory
🧮 Delta: 32s time, 55 MB memory
🔢 Commit: 9d3a5cc

🟢 Generation time is unchanged.
⚠️ This PR increases peak memory.

📅 Last benchmark: 2026-06-29 20:51:54 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new bundled-asset structures (tombstones and wind turbine) and integrates them into landuse/power generation, while adjusting schematic placement safety and forest spacing to better match the new asset footprints.

Changes:

  • Replace procedural cemetery graves with bundled tombstone/crypt schematics and add a cemetery stamping pass that avoids water/roads.
  • Add bundled wind turbine schematic placement for power=generator + generator:source=wind elements (nodes and centroid for ways/areas).
  • Replace a debug-only schematic size assert with a runtime halo-extent guard; increase schematic-pack tree spacing.

Reviewed changes

Copilot reviewed 9 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/trees/region.rs Increases base tree spacing to account for wider schematic canopy footprints.
src/structures/windturbine.rs Introduces embedded wind turbine schematic loading + placement with deterministic rotation.
src/structures/tombstone.rs Introduces embedded tombstone/crypt loading and deterministic cemetery scatter logic.
src/structures/schematic.rs Adds re-anchoring helpers, new block mappings, and a runtime halo-extent guard in place_structure.
src/structures/mod.rs Exposes the new tombstone and windturbine modules.
src/element_processing/power.rs Adds generator handling and routes wind generators to wind turbine placement.
src/element_processing/landuse.rs Removes old procedural graves, preserves flower scatter, and adds a tombstone stamping pass for cemeteries.
src/data_processing.rs Threads road_mask through to landuse generation to support tombstone road avoidance.
src/block_definitions.rs Adds missing block IDs/constants needed by the new schematics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/structures/tombstone.rs
Comment thread src/structures/schematic.rs Outdated
Comment thread src/element_processing/landuse.rs Outdated
louis-e and others added 2 commits June 29, 2026 22:29
Satisfies clippy::collapsible_match under --all-features, which the CI
lint job runs with -D warnings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- tombstone maybe_place: early-return for non-grid cells before the water
  and road checks, guarded by a compile-time LARGE_GRID % SMALL_GRID invariant
- schematic: precompute max_extent for the halo guard instead of rescanning
  voxels on every place_structure call
- landuse: fold the cemetery tombstone pass into the main loop, dropping the
  duplicate floor_area iteration

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants