I have managed to set up the interrupt for the generic drop-off stations without issue, but I'm having some problems setting up the one for the pick-up ones.
Originally, I tried using the "Item count" condition setting the [Item Parameter] equal to 0. I was hoping this would match any item that is not in the train cargo, and go to the corresponding station. However, as far as I can tell, this doesn't work because only items that are already in the cargo are being considered.
These are some solutions I found, but all of them have some disadvantages that I would like to avoid:
- Re-naming all pickup stations to "Pickup", regardless of what they load. That is, removing [Item icon] from all the pickup station names. Then, having an interrupt condition where if the train is empty it goes to a "Pickup" station. This does work, but it means I can't tell what the station is loading from the name, which I don't like.
- Another approach that does seem to work is setting an interrupt condition checking for a circuit [Signal Parameter], and setting the target station to "[Signal Parameter] Pickup". If I then connect a constant combinator to all stations and set the signals to all the possible [Item icon] values, the trains are able to find the corresponding stations. However, this means I would need to change the signals each time I added a new pickup station type. This is easy enough to do with logistic groups, but I am sure I would eventually forget to do it when adding a new type of station.
- So far, my preferred solution is doing option 2, but adding signals for all items I may ever want to load into a train. Then, I set the interrupt conditions to [Signal Parameter] > 0 AND "[Signal Parameter] Pickup" is not full. The second condition is important, as otherwise the train can pick any signal it receives, even if no station with that name exists, which breaks the system. Other than the almost negligible cost of one constant combinator for every new station I create, the main downside of this approach is the amount of time it will take me to add all the potentially relevant signals to the constant combinator. Also, if I ever want to use this system with items added by mods, I would have to remember to add those to the blueprint.