Feature: Multi-tile depots #9577
Motivation / Problem
Replacing thousands of old steam trains with monorail replacements is tiresome.
This PR allows joining several depot tiles for the same vehicle type into one single depot. For joining them, I have tried to use the same criteria as for joining station tiles.
Replacements with different railtypes are enabled with the option "allow replacing rail vehicles with incompatible railtype". The same applies for road vehicles. Then, users can build a monorail depot tile joined to a normal rail type depot and replacements are much easier.
#8480 adds extended depots (which are not included here) and also contains the commits of this PR.
If a hangar or depot has several tiles, user cannot control in which tile a new vehicle is bought. (On the other hand, the hangar window shows all vehicles in all hangars of the airport: I see this as something good, as in this way it is more difficult to miss stopped aircraft in an airport.)
I don't know whether this feature can be accepted. It adds more settings and getting used to this feature takes time.
The PR touches thousands of lines of code. There are some things I am not happy with yet and I don't have much time to revise it. Code reviews of this PR can help me to improve it, as it will hint me which parts I need to work on.
Possible To-do (discarded by now)
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
The text was updated successfully, but these errors were encountered:
So just to make sure I understand this: This is not about allowing "long" depots, or requiring that players build larger depots to contain bigger train or more trains, but simply letting multiple adjacent depots act as one single depot with multiple entryways?
No, it can be exploited by rearranging train chains. Currently depot size is limited by station_spread setting. So users could "teleport" wagons up to 64 tiles. I will look into it and think about adding a cost for moving vehicles from one tile to the other or moving the whole chain to an appropriate tile for making exploits more difficult.
It should work the same way as building stations do. I (ab)use the same settings used for stations for "station spread" and "allow building distant stations not directly adjacent".
Whether it is necessary to create two new settings or rename the existing ones is something I haven't decided yet.
It is the first part of #8480, but without including extended depots. This is no alternative proposal, but a first step.
I will try and fix the possible exploit and change the current draft state. Anyway, adding another setting for depot spread and setting it to "2" would fix it.
I have added a setting for controlling depot spread instead of reusing the station spread setting.
About the teleportation exploit, it is very difficult to know in which tile a vehicle ends up after a rearrangement or replacement. Yet it is a possible exploit, it is difficult to apply and to get an advantage of. Anyway, setting a low value for max. depot spread should help with this and I do not want to add extra cost for moving vehicles.
Also, this last year I have had in mind modular airports while working in the "multi-tile depots" and the "extended depot" concept. This month I have finished reviewing how aircraft and hangars are integrated in this PR, so it doesn't make modular airports more difficult to be introduced (at least with my idea of how modular airports should work).
I have finished working on this PR. If it is acceptable to start reviewing it (even with the teleportation exploit not being fixed), I could remove the "Draft" state. Just let me know.
…LE the number of the depot id, instead of a tile index.
…hey have the same transport type.