-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
[NRT] Building a tramtype over a roadtype with the NO_HOUSES flag set causes the flag to be ignored #9071
Comments
I think the issue here is that the (default?) electrified tram lines don't have the NO_HOUSES flag set, which is what is happening here - town thinks it's fine to build houses along a tramline, the bordering road is not considered after that |
Ah, I am (perhaps?) mistaken - the issue is that it's checking tram types at all - the town growth algorithm only tries to build houses next to roads, but then Line 1322 in 2feb801
Of course, it does mean that NO_HOUSES has no effect for tramtypes... |
Should the default trams be changed to NO_HOUSES? Perhaps the logic should be to go by what the road type says, unless there is no road, then go by what the tram type says. |
Thinking about it (more), we don't want NO_HOUSES on default trams, as that would mean (currently) that road + tram would become devoid of houses. Is the (actual (actual)) issue that this is also checking trams when there's no valid roadtype (i.e. tram on its own) ? |
That's why I said go by what the road type says if it exists, so that a default road and a tram type with no houses on it would still get houses. Words. |
Taken another look at this. There are 2 options -
NewGRF specs are a little ambiguous on it: https://newgrf-specs.tt-wiki.net/wiki/Action0/Roadtypes#Road_type_flags_.2810.29 A demonstration of the first method is below Further thoughts/opinions appreciated. |
IMO the most logical / correct way would be to only build houses if neither of the tramtype or roadtype has NO_HOUSES. So leave the flags on the trams and roads as is, but change the code so it checks for both, and only build houses if both of the types allow it. |
Wasn't the whole point of this highway thing to stop town growth from advancing along it? How did it turn into a neighbouring road check and these ugly and illogical exclusion zones? While town growth can still branch off the highway (#8506) or jump to other town and grow there? |
Version of OpenTTD
1.11.0, but probably all since NotRoadTypes was introduced
Expected result
If a roadtype disallows houses, a tramtype built over it should not override that.
Actual result
The highway shown here has the NO_HOUSES flag set, yet houses still build next to the electrified tramway crossing it. The non-electrified tramway also has the NO_HOUSES flag set which is why houses are not building there, but that shouldn't be necessary since houses should not build alongside a tramway on its own anyway.
Steps to reproduce
tramtype_test.zip
This zip contains a small save and a modified NewGRF demonstrating the behavior, as shown above.
The Highway roadtype has the NO_HOUSES flag set, as does the non-electrified tramway, while the electrified tramway does not have the flag set.
The text was updated successfully, but these errors were encountered: