Removed the ability for rails to cross impassible terrain - #4903
Conversation
WalkthroughRail pathfinding now checks whether the current node is impassable. Traversal stops immediately for impassable sources. Existing water and shoreline rules remain unchanged. ChangesRail traversal rules
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/core/pathfinding/algorithms/AStar.Rail.ts`:
- Around line 55-86: Add regression coverage in PathFinding.Rail.test.ts for the
rail pathfinding behavior around isTraversable: verify an impassable source, a
passable node adjacent to an impassable node, and a route that would otherwise
cross impassable terrain. Keep the existing adjacent land-to-land case and
assert that impassable nodes are never included in returned paths.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 35f0deb9-5007-4dde-a217-2f4d767e1bf3
📒 Files selected for processing (1)
src/core/pathfinding/algorithms/AStar.Rail.ts
Add approved & assigned issue number here:
Resolves #4902
Description:
Removed the ability for rails to cross impassible terrain


Before:
After:
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
tktk1234567