-
Notifications
You must be signed in to change notification settings - Fork 19
Metarules implementation of road roundabouts #510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
memo33
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all, this looks good to me. The code is very clear and easy to follow, giving us confidence that it works as intended. (I haven't tested it in the game, but as long as all tile IDs defined on this branch can be constructed in the game, it should be fine.)
Thank you for your review. |
This pull request replaces the manually written RUL2 of the road roundabouts with a metarules implementation. It was motivated by coming changes to the street network, draggable diagonal streets were not compatible with the existing roundabout implementation.
The metarules code achieves a 90% reduction in RUL2 code by eliminating all adjacencies by way of a surrogate tile. The surrogate tile cannot be drawn in the game, but rather is used to trigger automatic adjacencies with the NAM.dll. Every roundabout tile overrides ortho avenue into the surrogate, and non-INRUL tiles are also overridden by the surrogate tile. In doing so, each roundabout tile is able to reliably override any other roundabout tile.