Feature request: looping routes
vtenfys opened this issue ยท 6 comments
Is your feature request related to a problem? Please describe.
I cannot create routes which loop in a circle - routes only go from a starting point to a destination.
Describe the solution you'd like
Routes which loop in a circle - when reaching the final station, the train continues in the same direction towards the first station in the route. This would only work when the track itself loops.
Additional Information
Timing is probably difficult with the current model - after a loop, the train might be at the first station at a different time to usual.
Potential solutions to this:
- make the train wait after returning to the initial station so that the timing is in sync, rather than destroying and spawning a new train
- use a different spawning model entirely - e.g. rather than always spawning at the first station, instead spawn a fixed amount of trains which are equidistant to each other around the loop
@linuxkettle yes this is the main idea, and if player are moved from the disapearing train to the one that has spawned, then the ilusion is perfect
I see where @YPetremann is going: if you change the platform wait time so that one train disappears when the other arrives, it gives the illusion of it being the same train.
This may be a bit difficult, because when the author may modify the .json, he may need to change a large amount of code in the entire .json file about the function of Minecraft-Transit-Railway!
I see a way to solution this :
- If the last destination is the first destination of the route, the train that will despawn stay visible until the other one spawn.
- When a train stop at a platform and will despawn, it is flagged to despawn.
- When a train is flagged to despawn, players can't enter it, players in it are moved to other train on the platform not flagged to despawn.
- When a train close door and is going to depart from last passengers platform or to despawn, players are moved to the nearest platform blocks.
- Passengers platforms are stops where there is platform blocks, and non-passengers platforms consist of stops without platforms blocks.
It could solve problems