The blue lines indicate Inserters, Paint only does arrows in four directions and I couldn't be bothered. Basically each row of chests is for a particular ore type, I've set it up so that when an ore is unloaded it filters down the chests until it reaches its row. This means the chests CANNOT be full but I'll come back to that.
This is a more detailed view showing the circuit connections.
- 1. This is a Decider Combinator that outputs a signal if the ore in its row falls below a threshold, I'd say 2,000 ore. Eg ([Gold] < 2,000). The output of all these are connected.
- 2. A Constant Combinator outputting 100,000 of the row's resource. This is to counteract the other Constant Combinator below so the correct value is compared.
- 3. Stack Filter Inserter(s) pulling the ore from the last chest and outputting to a belt to take it to its smelting area. You can fit two here, one for each belt lane.
- 4. A Stack Filter Inserter configured to Set Filters, so it moves anything from the chest above it.
- 5. A Constant Combinator set to -100,000 of the ore type. This negates the signal from the chests so the Stack Filter Inserters ignore it and move everything else.
The connected Decider Combinators control when the trains should deliver a shipment of ore to prevent the chests from filling up (preventing other ores being passed on). It needs to be a number low enough that no chest can possibly fill up and there is always at least one stack free. There is two ways to accomplish this, either have each train wait at a Train Stop in the waiting bays for the unloading stop, or send the signal all the way across your tracks to the outposts to hold the trains there which is somewhat neater but less reliable (if a biter destroys a Power Pole somewhere). The former handles multiple outposts per ore better too but even two MK3 trains should not fill 12 Steel Chests, you'd need something like six.
In hindsight this could be more efficient, the Constant Combinator (5) could be connected to each downward inserter (4) by a red wire which would eliminate the need for (2), but it works.
NOTES:
- I've added an extra row of 'junk' chests to the bottom just in case any chaff ends up in the system somehow.
- I'm actually using Express Stack Inserters which are of course much faster but wordier to keep typing =P
- I haven't finished a modded game yet so I don't know if in Bob's Mods or other modded games you ever need more than one lane of a material, but you could output to multiple belt lanes by having (3) output to another chest (more if necessary) where you then have the room to insert onto more than one belt.
- It -might- be possible to have 24 Inserters unloading the train if 12 Express Stack Inserters aren't enough for you. You would need to put the chests right up against the train, have Inserters below them that pick up from the train and insert to the chests, then another row of inserters above the train inserting into the same chests (using Bob's Inserters to change the pickup / drop locations). However this means all 24 Inserters would be extending, not turning, and I'm not sure what the throughput is like on that.