Motivation / Problem
It is strange a train with a length of 6 tiles can get out from a 1-tile depot.
This PR introduces a new depot tile for rail, road and water transport: extended depots.
Standard depots are the legacy depots of OpenTTD. They behave the same as before and now can be joined to other depot tiles under the same DepotID and transport type.
Extended depots have limitations related to the amount of vehicles they can handle. It is possible to join extended depots with other extended or standard depots.
You can also join depot tiles with different railtypes for replacing an electric rail vehicle with a maglev or monorail replacement.
How to use it:
This is for testing purpose.
It needs testing and feedback.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
Binaries of this branch are available at https://www.openttd.org/downloads/openttd-branches/pr8480/latest.html . They might not be up-to-date with latest version of this PR, so check the date!
Really easy to use, the ro-ro capability like station tiles is something I really needed in some games
The only downside: after trying it I found that it's missing a sort of warning when you purchase too many wagons in a depot (you get it when trying to start the train), since we have the measurement lines in depot view consider to highlight the current depot max size.
This patch will be amazing with a future grf support.
Internally, it is difficult to know when adding a new wagon will make the train too long. There may be more than one platform available, and they may have different lengths and rail types. So, the only help you have now is to press X and see what happens in the depot when buying or moving vehicles.
This feature would be excellent to have in OpenTTD.
I gave this a try in the web version. I get a crash with the following depot layout and trains:
This is the crash log in DevTools. Unfortunately the backtrace looks a bit incomplete; I can compile a debug version on Linux and see if that gives a more coherent log if that would be helpful.
Thanks for the report. That is enough to find the bug. I am still working to fix it and some other things.
…and reverse if appropriate.
As the autoreplace flag is set, only lift and tryplacing in the original command for autoreplacing and not in any recursive calls to move, buy, refit and sell commands.
…ames with other versions of OpenTTD.
Thanks. I am still fixing some bugs and reviewing some parts of the code. Once I finish it, I'll see if I can create a "smaller" PR with just the feature of joining several standard depots and get the code reviewed so it can be improved. As for your offer to test the PR, I'll let you know if I do any big change that needs to be checked.
By the wya, I recently fixed a bug dealing with rail construction and pressing ctrl key. The only commit that changed is the one with summary "Add: Add the widget for rail depots."