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
Fix #8506: Towns shouldn't add junctions to NewGRF roads they cannot build #8535
Conversation
96ba627
to
6807bbe
Compare
I unfortunately ran out of time to comment on this yesterday, but in any case, there are some potential issues:
Adding a new road type flag to enum RoadTypeFlags and therefore to the GRF API is comparatively trivial, and avoids changing the meaning of an existing flag to do something different. |
In light of the above comment, I am going to revert this change for now, so it can be done properly. Tnx @JGRennison ! |
…oads they cannot build (#8535)" As per #8535 (comment), jumped the gun here.
…oads they cannot build (#8535)" (#8541) As per #8535 (comment), jumped the gun here.
Thanks, @JGRennison! I'll take a look at your codebase to see about adding a new flag specifically for no town intersections. |
Just asking, if this thing is eventually patched, could it perhaps be something the user can toggle? I understand why some people don't like towns adding junctions to newGRF roads they're not supposed to build on, but some of us actually like the feature. Especially since one way road mechanism allows you to prevent junctions from being built too. |
This approach has been reverted, since I didn't properly understand other use cases for this flag. It is not being implemented this way. |
Fixes #8506
Motivation / Problem
Per #8506, towns add junctions to NewGRF roads which have the
TOWN_BUILD
flag disabled.If a town cannot build a road type, I would assume that it should not be able to add junctions to roads of that type.
Description
I have created a savegame to test. You will need the RattRoads NewGRF, available from Bananas.
HighwayRoadTest.zip
While the town is not able to build junctions on the highway, the town growth algorithm can still walk down the highway to build houses past the highway.
Note that while the RattRoads Highway also has the
NO_HOUSES
flag set, this is not checked as I think it is irrelevant to towns building said road.Limitations
There could be side effects I'm not aware of. Please help test this!
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.