The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Nazalassa on July 29, 2024, 04:34:34 PM

Title: Depots can only be built on way ends even though they support 2+ ribis
Post by: Nazalassa on July 29, 2024, 04:34:34 PM
Some paks feature depots that support several ribis, that is they allow for ways to exit them from several sides at once. This contrasts with "regular" depots, which can only be build on way ends, and do not allow ways to exit them from any other side.

An example is the train depot in pak128 (unlocked in 1940 or so). As shown in the following screenshot:

simscr42.png

The top depot was built at the end of the track. Then the track was extended from the other side of the depot. It was not possible, however, to build the depot "in-situ", as shown by the error message.

Besides, the error message looks a bit rude. (suggestion: "This depot can not be built here: it requires a flat way end" or "This depot can not be built here: it requires a flat, straight way", depending on the context)
Title: Re: Depots can only be built on way ends even though they support 2+ ribis
Post by: prissi on July 30, 2024, 06:12:32 AM
It should not be possible to extend a track from a depot. Depots are single track. Extending this is an error.
Title: Re: Depots can only be built on way ends even though they support 2+ ribis
Post by: Nazalassa on July 30, 2024, 11:50:01 AM
Quote from: prissi on July 30, 2024, 06:12:32 AMIt should not be possible to extend a track from a depot. Depots are single track. Extending this is an error.

Even if the depot is defined to have dims=1,1,2 in its .dat file? Depot building logic forbids building it elsewhere than a way end, but I guess that, for Simutrans, the dims mean the same as for stops - track can be extended on the other side.
Title: Re: Depots can only be built on way ends even though they support 2+ ribis
Post by: prissi on July 31, 2024, 07:37:48 PM
This means the painter was too lazy to provide all four rotations. There is no logic in place to handle drive trough depots. Weird thing smight happen whenever a convoi on a normal route enters a tile with a depot onn it.

However, changing to the route finder to disallow any trough route through a depot would probably allow to through depots since the entering and exiting routines would be the same as now.

Currently, the through depot becomes a waypoint and is otherwise ignored.
Title: Re: Depots can only be built on way ends even though they support 2+ ribis
Post by: prissi on August 01, 2024, 09:19:55 AM
Ok, that required very little changes.

Check r11369
Title: Re: Depots can only be built on way ends even though they support 2+ ribis
Post by: Nazalassa on August 01, 2024, 10:47:26 AM
r11369 seems to work.

In some cases, a depot in the middle of a way may make sense - for example, an uniflow generator may be placed anywhere on the uniflow to do its job.