News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Erratic behavior with "cannot delete public way without diversionary route"

Started by neroden, September 13, 2023, 10:39:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

...and with "cannot leave a city building unconnected by road"

When you're deleting, the "bulldozer" tool (deleting a tile) and the "remove road" tool (deleting the connection between two tiles) don't behave consistently.

Sometimes the bulldozer will work and the "remove road" one won't.

Sometimes the "remove road" tool leaves one side of the road "half-connected" (it doesn't properly adjust to show that it's now a dead-end) -- it will always adjust ONE of the two tiles but not necessarily the other one.

Sometimes it will refuse to remove a single dead-end tile which isn't adjacent to any buildings, even when I HAVE built a diversionary route.  This is particularly annoying when trying to remove railroad grade crossings after building a bridge, but it's also tripped me up in other urban renewal situations.

I'm not sure where the route of the problem is here, but I suspect it's a "fencepost" or off-by-one type error, and I suspect they're all related.

In addition, sometimes I can't delete a single dead-end tile because it says that there's a city building which would be left unconnected, but it's not actually true -- all the adjacent city buildings have adjacent roads on other sides.  Also, sometimes it seems to have decided that an adjacent *bus stop* or *station* is a "city building" -- and doesn't count the road which the road stop is ON as being connected to it -- which makes it very difficult to delete extraneous roads which are next to a bus stop.

Desired behavior:
- When the "remove road" tool is used to disconnect two pieces of road (without deleting anything), it should succeed if those two pieces of road are connected by a different route which is short enough.  Both pieces should have proper "dead end" appearances after this.
- When the "bulldozer" tool is used to remove a single piece of road, it should succeed if
(a) each adjacent city building or industry is connected to some other road, with bus stops, stations, etc. NOT counting as city buildings
AND
(b-1) if it was only connected to one other tile, it should always succeed
(b-2) if it was connected to two, three, or four other tiles, then for each pair of the other tiles, they are connected by a different route which is short enough.  (Note that in this case the measurement for "short enough" should be exactly 1 less than the measurement used when disconnecting two roads without deleting anything, to make the behavior consistent.)

And all pieces should have proper correction of their shapes (dead end, curve, etc.) after this.

(When "disconnecting" multiple tiles at once they should effectively be deleted one at a time in order; the fact that this is asymmetrical depending on which direction you go is OK.  I'm not quite sure how this works right now, but I'm also not bothered by it; in difficult cases I can always delete one at a time.  The problem with the single-tile case, and the problem with the case of disconnecting two adjacent roads without deleting any times, need to be fixed.)