Feature request: extend ConnectSurfaces() interface to reserve/wait for a train
Posted: Tue Dec 05, 2023 10:44 pm
I noticed that LTN now has a ConnectSurfaces() option, which is used in Space Exploration to allow trains to drive up space elevators to reach different surfaces. In that use case the train is actually transported from one surface to the other.
I would like to modify this for rockets earlier in the game that wouldn't transport the train itself. Instead the "space port" would unload the cargo and take over the delivery using reassign_delivery placing the cargo in a rocket. The rocket then goes up into space. In space the cargo then needs to go back into a train, for which I need a train.
So what I need is a function to give LTN a train, a source stop and the delivery info and have LTN pick a train to deliver the cargo. LTN can then either return the train entity or better invokes a callback when a train is available. LTN also sets the schedule for the new train and calls reassign_delivery internally.
This would be kind of like (an asynchron) reassign_delivery except LTN picks a new_train out of the local depot to be the new train and and sends the train to the given source stop first.
Does that sound like something you would be willing to merge?
PS: The problem with rockets in Space Exploration is that they are one way. If I follow the elevator code then the train goes up into orbit and it then stuck there unless I have a second rocket that goes back down later (or the other way around). Shipments are usually not balanced so there isn't the same number of rockets going both ways. Rockets are real entities that take resources to build and fuel so it makes no sense to send a rocket to transport an empty train. There is no easy way I can explain how trains would return to their home after delivery if I shoot them up into space or down to a planet.
I would like to modify this for rockets earlier in the game that wouldn't transport the train itself. Instead the "space port" would unload the cargo and take over the delivery using reassign_delivery placing the cargo in a rocket. The rocket then goes up into space. In space the cargo then needs to go back into a train, for which I need a train.
So what I need is a function to give LTN a train, a source stop and the delivery info and have LTN pick a train to deliver the cargo. LTN can then either return the train entity or better invokes a callback when a train is available. LTN also sets the schedule for the new train and calls reassign_delivery internally.
This would be kind of like (an asynchron) reassign_delivery except LTN picks a new_train out of the local depot to be the new train and and sends the train to the given source stop first.
Does that sound like something you would be willing to merge?
PS: The problem with rockets in Space Exploration is that they are one way. If I follow the elevator code then the train goes up into orbit and it then stuck there unless I have a second rocket that goes back down later (or the other way around). Shipments are usually not balanced so there isn't the same number of rockets going both ways. Rockets are real entities that take resources to build and fuel so it makes no sense to send a rocket to transport an empty train. There is no easy way I can explain how trains would return to their home after delivery if I shoot them up into space or down to a planet.