The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: AP on December 13, 2017, 07:11:51 PM

Title: Bug: River tiles can be over-written with canal of lesser capacity/width
Post by: AP on December 13, 2017, 07:11:51 PM
While players cannot demolish river tiles, they can upgrade them.

Unfortunately it seems the game currently accepts player river-upgrades without checking whether they represent an improvement.

E.g. wide river tiles can be over-written by narrowboat canal tiles.

It is not possible for the player to undo a river upgrade done by accident, i.e. depreciate or downgrade it back to the river it was before.

Hardcoded altitude restrictions on the constructions of canals above a certain width (wider canals only possible at lower altitudes) does not have a corresponding restriction on the spawning of rivers.

A wide river at high altitude can therefore be accidentally divided into two sections by a tile of narrow canal, and the player is unable to upgrade that canal tile to a correspondingly wide canal.

When using the "drag and draw" mechanism to upgrade sections of river, it is very easy at confluences to catch sections of adjacent rivers. Rivers ought not to accept upgrades unless they are actually an improvement.

Title: Re: Bug: River tiles can be over-written with canal of lesser capacity/width
Post by: jamespetts on December 15, 2017, 01:31:58 AM
Thank you for the report: I think that I have fixed this. I should be grateful if you could re-test and confirm that this is now working.

I have also fixed the issue on the server map, although I am afraid that this had the side-effect of destroying your depot.
Title: Re: Bug: River tiles can be over-written with canal of lesser capacity/width
Post by: AP on December 15, 2017, 07:12:51 PM
Thanks for fixing the map  :D

The bug appears fixed, but it now appears impossible to upgrade "upstream small river (navigable)" sloped tiles i.e rapids, with canal of the same width. E.g. tile (5836,2080) on the bridgewater server game.

Possibly your fix prohibits upgrade of lesser or *equal* width, which it should, but I suggest it should permit equal width upgrades in the event the tile is sloped.

Also we need to ensure that the prohibition on canals at altitude doesn't apply to sloped tiles, so river which goes very high (as on this map) can always have their rapids upgraded with equivalent width locks.

Title: Re: Bug: River tiles can be over-written with canal of lesser capacity/width
Post by: jamespetts on December 16, 2017, 01:25:07 AM
The issue that you had with canalising this river was the altitude restriction. I have disabled the restriction for slope tiles to allow canalising rapids.