Train Stations That Activate Only When Item Is Requested
Posted: Fri Jun 27, 2025 5:05 pm
So let's say I have 10 trains that idle on depot stations. And I have 3 iron ore export stations on different mining patches. When a station that needs the iron ore a train full amount, that station creates a signal (-1 iron ore) and sends it through the radar.
The idea is, when the export/mining station sees this signal, it will increase it's train limit and get an available train from the depot. Now I'm canceling the -1 iron ore signal when a train is on it's way and zeroing out the iron ore signal so no more trains are requested.
However, for a split second, when no train is on it's way and a train is requested in the smelting station, all three of the iron ore export stations increase their train limit because for that one tick, there is no train on it's way to any of the mining stations and I end up 3 iron ore trains waiting to go to the smelting stations, only one can go and the other 2 are waiting for god knows when they will be requested. I don't want that. Has anyone found a good way to do this?
I've tried creating an auto resetting timer and only enable the station if the timer is at zero, and it mostly works because the timer won't be the same in all of the export stations so only one of them will request that one train when it's enabled for a tick. but I don't like this solution too much. mainly because it's kind of dependent on chance and I was hoping if anyone has made a export queue?
The idea is, when the export/mining station sees this signal, it will increase it's train limit and get an available train from the depot. Now I'm canceling the -1 iron ore signal when a train is on it's way and zeroing out the iron ore signal so no more trains are requested.
However, for a split second, when no train is on it's way and a train is requested in the smelting station, all three of the iron ore export stations increase their train limit because for that one tick, there is no train on it's way to any of the mining stations and I end up 3 iron ore trains waiting to go to the smelting stations, only one can go and the other 2 are waiting for god knows when they will be requested. I don't want that. Has anyone found a good way to do this?
I've tried creating an auto resetting timer and only enable the station if the timer is at zero, and it mostly works because the timer won't be the same in all of the export stations so only one of them will request that one train when it's enabled for a tick. but I don't like this solution too much. mainly because it's kind of dependent on chance and I was hoping if anyone has made a export queue?