The International Simutrans Forum

 

Author Topic: Pull Request: fix for cities building single-height bridges over navigable water  (Read 230 times)

0 Members and 1 Guest are viewing this topic.


Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20342
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for this. I notice that you have changed the following line of code:

Code: [Select]
const bool public_service = player ? player->is_public_service() : true;

to this:

Code: [Select]
const bool public_service = player ? player->is_public_service() : false;

This will cause roads built automatically by towns and industries not to be treated as being built by the public service player for these purposes. May I ask whether this was intended?

The current code allows automatically built bridges to be single height over navigable ways only if the ways have not been used recently (the current or previous game month). Is this not sufficient; or does this not work properly?

Offline freddyhayward

  • Devotee
  • *
  • Posts: 456
  • Languages: EN
This will cause roads built automatically by towns and industries not to be treated as being built by the public service player for these purposes. May I ask whether this was intended?
Yes, because being the public service would exempt towns and industries from most of the restrictions.

The current code allows automatically built bridges to be single height over navigable ways only if the ways have not been used recently (the current or previous game month). Is this not sufficient; or does this not work properly?
It is not sufficient because it allows for public right of ways to be frequently blocked. Traffic on the way might have just started, or be less frequent than once per two months. And in any case, single-height bridges being built in map generation causes almost all navigable rivers to be blocked. Also, the principle of public rights of way should be that it can't be blocked at any time.