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: big depots.
Small depots are the legacy depots of OpenTTD. They behave the same as before and can also be joined to other depot tiles under the same DepotID.
Big depots can join several tiles as well, as long as all the depot tiles have the same transport type (you cannot join a road depot with a rail depot.)
It is possible to join small depots with big depots.
You can also join several rail platforms with different railtypes for replacing an electric rail vehicle with a maglev or monorail replacement. The same applies for big road depots.
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.
… vehicle is in depot. # Conflicts: # src/train_cmd.cpp
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.