Repository navigation
feat: fence and gate lines as their own layer - #4
Merged
Merged
Conversation
Fences run along cell edges in a dedicated map/world layer with named fence styles (W, N, NW corner, post, alternating pillar edges) and gate styles (1-8 edges, closed/open pieces, mirrored when opening left). The exporter adds them as wall objects with native edge bits, so a fence no longer takes a cell's single decoration slot. World fences are projected into every section they cross, so they stay continuous at seams. Building and water cells are skipped and counted. A fence layer raises the map format to 12 and the world format to 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
…runs) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements section 4 of the transfer contract (#2). It is stacked on #3 because both raise the world format to 7. Merge #3 first; this PR then retargets to
develop.Why a separate layer:
LinearFeatureallows 64 features per map, and fences built as decorations take the single decoration slot of a cell.Model (
FenceLines.cs;MapProjectandWorldProjectboth getFences,FenceStylesandGateStyles):FenceLine:PostSpacing, with posts at corners and every N edges;FenceStyle:W,N, optionalNWcorner,Post, andWAlt/NAlteveryAltEveryedges (a brick pillar between forged sections).GateStyle: 1–8 edges wide, closed pieces plus optional open pieces.OpensTo = leftmirrors the piece order.Composition and export:
Non the cell to its south, and a vertical edge givesWon the cell to its east.NW.TileComposeradds the pieces after decorations, so a fence and a decoration (bush, lamp, bench) share a cell.Formats:
Tests (
FenceLineTests):.lotheader;Results:
dotnet run --project tests/SimplePZMapmaker.Tests343/343 passed,npm test184/184 passed.Next from my side: GeoJSON
barrier=*lines → fence lines (style mapping, staircase for diagonals, gate points), and the Pilna pipeline switching its fences to this layer.🤖 Generated with Claude Code
https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
Generated by Claude Code