The International Simutrans Forum

 

Author Topic: Rivers with public right of way cannot be upgraded to canals  (Read 389 times)

0 Members and 1 Guest are viewing this topic.

Offline Matthew

  • Devotee
  • *
  • Posts: 580
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Certain rivers cannot be upgraded to canals. I think this is because those tiles have public right of way (PROW).

Steps to reproduce:

1. Create a new map.
2. Find a long, large river generated by the game at low altitude (≤4). Observe that it has PROW on navigable tiles.
3. Switch to public player.
4. Manually place a long, large river (with all the different river sizes down to brook) next to the generated river. Observe that there is no PROW.


Savegame with steps 1-4

5. Switch to default player (use the Player dialog, as the keyboard shortcut will crash the client).
6. Try to upgrade both rivers to ship canals throughout their lengths.

Expected behaviour:

Both rivers can upgraded to ship canal throughout their length by Ctrl+LMB.

Actual behaviour:

The manually placed river can be upgraded throughout. But the generated river can only be upgraded to a canal on non-navigable tiles. The canalization fails without an explanation on navigable tiles with PROW.


Savegame with actual behaviour

Offline freddyhayward

  • Devotee
  • *
  • Posts: 681
  • Languages: EN
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #1 on: July 15, 2021, 03:36:45 AM »
Can you compare the canal and PROW river speeds? If the river is faster, this isn't a bug.

Offline wlindley

  • Devotee
  • *
  • Posts: 1068
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #2 on: July 16, 2021, 10:46:53 AM »
How would this best be patched:  Railways and canals built by 'Public player" should be 'grey' but rivers and roads should be 'orange'?  Should all roads so built be 'orange' or would highways be 'grey' and if so what's the dividing point? I'd like to write code to make this work as we expect, but -- what exactly would that be

Online Freahk

  • Devotee
  • *
  • Posts: 1521
  • Languages: DE, EN
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #3 on: July 16, 2021, 04:55:48 PM »
What exactly do you mean?
Do you refer to the difference in between "unowned" (orange) and public player owned (grey) ?

Offline wlindley

  • Devotee
  • *
  • Posts: 1068
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #4 on: July 17, 2021, 09:14:44 AM »
Exactly. The expectation is to be able to switch to public player as a "map editor mode" when creating or moving rivers and ordinary roads that should be "unowned" just like all the other program-created ones.

Online Freahk

  • Devotee
  • *
  • Posts: 1521
  • Languages: DE, EN
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #5 on: July 17, 2021, 10:33:33 AM »
I am not sure about that distinction.
Currently, the line is drawn in between automatically generated (unowned) and objects created by player interaction ((public) company owned) objects.

To be honest, I'd consequently distinguish in between natural-or-private objects (private as in natural person) and other objects, but there might be a reason no to do so.
Natural objects and Private objects, both are always unowned because Simutrans does not maintain the bank accounts of private persons nor the bank account of Gaia.
Anything else, which includes all ways except from natural waterways, should be owned by the company (including the public company) which built it.


Edit: Anyways, I guess object ownership is not the point of this bugreport!
Might we split this topic?

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20805
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Rivers with public right of way cannot be upgraded to canals
« Reply #6 on: July 18, 2021, 10:59:32 AM »
Thank you for your report. Matthew - can you confirm whether the canal to which you seek to upgrade the river has at least as good a top speed, maximum weight and at least as permissive a set of way constraints as the river that it is replacing? If not, then this is intended behaviour, as players using the river being replaced may find themselves unable to use the new canal in the same way as the old river.

As to ownership, this is unrelated, and I am doubtful that anything in particular needs to be done about this.