The International Simutrans Forum

 

Author Topic: [Minor][120.3 r8504] failed manual placement of buildings may alter road anyway  (Read 318 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin

  • Devotee
  • *
  • Posts: 1088
  • PAK-DEV P192C
  • Languages: DE, EN
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
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

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
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.