Repository navigation
Conversation
Connecting walls could replace a door with a plain wall, delete a wall with no piece for its shape, and read past the end of the alignment table. Brushes without a pole started with their corner piece, which drew an L at the start of every railing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
dudantas
left a comment
There was a problem hiding this comment.
Please keep the existing door when both shape passes lack an equivalent door.
| } | ||
| } | ||
|
|
||
| while (true) { |
There was a problem hiding this comment.
When the second shape also lacks a matching door, execution falls through to the ordinary wall_items pool and can replace the door with a wall. The shipped stone-wall data makes this reachable: isolated closed horizontal door 6251 can select ordinary pole 1296. Route that case to the existing id == 0 preservation path so the door keeps its item, action and unique IDs.
| while (true) { | |
| while (!wall->isBrushDoor()) { |



Summary
Fixes bugs in how walls connect when they are drawn: doors lost their kind, walls could disappear, and one loop read past the end of an array.
Fixes
WallBrush::drawstarted atalignment + 1and only stopped when it came back toalignment, so it walked past the end ofwall_items. It now wraps around the 16 shapes.doWallschanges the shape of a door, it looks for the same door type in the new shape, so a locked door stays locked. The action, unique and door ids carry over.++itbefore abreakcould skip the next item on the tile.getDoorTypeFromIDfollows redirects. It now checks brushes linked withredirectand stays within the bounds of the array.L. These brushes now start with a straight piece, and their ends continue the run.How to test
moist railing1, which has no pole. Both ends are straight and there is noL.moist railing1. The bottom right corner uses the corner piece.stone wallas a rectangle. Nothing changes for brushes with a pole.Documentation
No documentation change.
Tests / Validation
windows-releasepreset.clang-format17 passes on the changed files.cppcheckreports nothing onwall_brush.cpp.Not done: the steps above were not run by hand on the final commit, and nothing was run on Linux or macOS.
Related
#220 also changes
source/wall_brush.{h,cpp}, because it needsgetDoorItemIDtoo. Whichever merges second needs a small conflict resolution, and I will rebase it.🤖 Generated with Claude Code