News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[Minor][120.3 r8504] failed manual placement of buildings may alter road anyway

Started by Leartin, July 23, 2018, 10:11:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

For a year or so now, placing citybuildings manually defaults to "auto" rotation if the building has rotations. auto-rotation means that buildings rotation is dependent on the roads around it, probably calling the normal spawning code, which also causes road around that building to update to a city street. So far, this is fine. However, there are two minor inconsistencies:
1.) Since only citybuildings with rotations default to "auto", it seems as if only those upgrade roads - see original thread in german forum: https://www.simutrans-forum.de/mybb/showthread.php?tid=8876
2.) It seems rotation is checked before climate. If a building can't be placed due to climate restrictions, the roads around it still upgrade.

Both are very, very minor issues in the grand scheme of things, but since it might be very easy to fix (use "auto" even for 0 rotations, check for climate before roads) worth mentioning anyways.

prissi

None of the current code explicity calls updating the pavement when manually building a house. It was a sideeffect of the oreintation code. That means, only road were renovated, when a rotable building was tested next to them.

So the road renovation code was totally broken. Now every building will renovate exactly one non-renovated adjacent road tile, which should lead to a more consistent city road upgrade. Check 8549

Ters

Quote from: prissi on July 25, 2018, 10:13:28 PM
Now every building will renovate exactly one non-renovated adjacent road tile, which should lead to a more consistent city road upgrade.

I think buildings should renovate all adjacent road tiles. Otherwise, I can't see how every road tile will be automatically renovated. At a place where four roads meet, there are five road tiles, but only four adjacent buildings.

prissi

All eight surrounding tiles will be tested and hence subsequently renovated. Just only one tile per upgrade/new house to avoid too quick changes of town roads. I tested this with several games to have the desired effect.

Ters

It is just that I already find it somewhat annoying that intersections, and steets next to attractions, town halls and factories, tend to lag behind the city road timeline by two levels, there still being gravel streets downtown while some streets have gotten asphalt. They are usually not next to each other in the game I currently play, though. The gravel intersections are usually surrounded by cobble stone streets, but would the gravel intersection upgrade before the  cobble stone streets leading to them?

That steets only next to attractions, town halls and/or factories don't upgrade at all is a slightly different, but related annoyance.