Dispatcher: dispatch trains to chosen stations with signals


Adds a new train station (Dispatcher) that dispatches waiting trains to a station when a dispatch virtual signal is received (target station ID is provided via the signal).

Content
1 year, 11 months ago
0.16 - 1.1
461
Trains Circuit network

b Wagons uncoupled after dispatching set to automatic and cannot be loaded/unloaded

robot256 β˜†
4 years ago

When the dispatcher sends a train to stop, and the destination causes some wagons to uncouple via the Automatic Coupling System mod, the uncoupled wagons are stored in the Dispatcher memory as "being dispatched" even though they are at their destination and have no locomotive. Dispatcher code sets them to automatic, which means they produce a continuous "no path" error message (because without a locomotive they can't go either way), and more importantly, inserters cannot interact with them. Also, when you manually recouple to the wagons, Dispatcher resets the schedule to match the train that last uncouple those wagons.

This is a bug I submitted on GitHub in April, and yesterday I submitted a pull request with a tested fix for it. I added tests so that trains that have no locomotives are omitted/removed from the dispatching queues and set to manual mode.

4 years ago

Hi robot256,

Thanks a lot for your help! I will take a look at it, and if it is ok, I will merge it and update the mod.

New response