roads and bridges#82
Conversation
📝 WalkthroughWalkthroughThe map editor adds road and bridge terrain editing, bridge height and construction controls, bridge-aware hex state, updated terrain layering, rendering refresh behavior, localization strings, tests, and a project version update. ChangesRoad and bridge editing
Project version update
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Editor as HexInfoOverlay
participant ViewModel as EditMapViewModel
participant Map as IBattleMap
participant HexState as HexViewModel
Editor->>ViewModel: execute bridge height or construction command
ViewModel->>Map: replace edited hex
ViewModel->>HexState: update bridge properties
ViewModel-->>Editor: raise HexUpdated
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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/MakaMek.MapEditor/ViewModels/EditMapViewModel.cs`:
- Around line 424-454: Update IsGroundTerrain and the ApplyTerrainToHex
ground-layer logic so Clear is treated as a ground terrain. When applying Woods,
Rough, Pavement, Rubble, or another ground terrain to a clear hex, remove the
existing Clear layer before adding the new terrain, while preserving
ground-layer exclusivity.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3d32cc73-469d-4e49-94a7-645c9cf4044d
📒 Files selected for processing (9)
Directory.Build.propssrc/MakaMek.MapEditor/Controls/HexInfoOverlay.axamlsrc/MakaMek.MapEditor/Models/ToolType.cssrc/MakaMek.MapEditor/Services/MapEditorFakeLocalizationService.cssrc/MakaMek.MapEditor/ViewModels/EditMapViewModel.cssrc/MakaMek.MapEditor/ViewModels/Wrappers/HexViewModel.cssrc/MakaMek.MapEditor/Views/EditMapView.axaml.cstests/MakaMek.MapEditor.Test/ViewModels/EditMapViewModelTests.cstests/MakaMek.MapEditor.Test/ViewModels/Wrappers/HexViewModelTests.cs
Summary by CodeRabbit