Smart Filter Inserter
Posted: Fri Aug 12, 2016 4:15 pm
Assume you have a chest (or belt or train waggon - it doesn't matter) with mixed content from which you want to pick - lets say 50 repair packs, 30 fast inserters and 15 laser turrets with only ONE filter inserter.
In this chest is an unknown amount of anything (iron, coal, ...), maybe there are enough packs, inserters and turrets, maybe there are plenty or none at all in any kind of variations.
You'd do this: connect your target chest to your filter inserter - insert the filter condition to your wanted goods and now the my trouble beginns.
I can't make up a logical network that tells the filter inserter has enough eg. repair packs but still should grab turrets and so on.
You could make up some ORed conditions (grab things as long as there is still something missing) but this will not work because the filter insert would happily grab turrets even you have already 2k of them
but there is 1 repair pack missing.
What i need is a really smart filter inserter where i can set up not only WHAT to insert but also HOW MUCH based on some logic condition individually per every WHAT to grab.
I have some kind of awkward workaround:
unload the chest with a filter inserter onto a belt, from there grab with another filter inserter (one for each different stuff i need) connected to a logic network (for the numbers) AND let the belt be unloaded into the chest again.
Where do i use this:
My mining outposts are automatically supported with defensive goods in the very first waggon of each train. The waggon is filled in my production central with various turrets, ammo, repair packs and stuff.
AND i have some general purpose trains which visit all outposts and restock their needed supply.
At an outpost i set up this workaround to unload only the needed amount of goods -- e voila -- automated, electrified, defended outpost.
BTW: My outposts are pretty far away so there is no direct connection to them but trains. I'm just figuring how to notice if a specific outpost is depleted in a CENTRAL unloading station and signaling that by some display?
Hope this wasn't answered elsewhere - search results were negative.
EDIT:
I think i nailed it now:
What i want is an inserter which works (roughly) like that on belts:
Phase 1) Identify what will be picked next (or empty) -> send to logic
Phase 2) Pick on yes/no from logic
Phase 3) Use standard rules for dropping
For chests and the like we need phase 1.5
1.5) logic can signal to "move over to next stack to pick from" or more general "move to stack #n"
In short words my inserter would have a reverted workflow where the (outside) logic decides what to do and not the inserter is telling the logic what it has done.
In this chest is an unknown amount of anything (iron, coal, ...), maybe there are enough packs, inserters and turrets, maybe there are plenty or none at all in any kind of variations.
You'd do this: connect your target chest to your filter inserter - insert the filter condition to your wanted goods and now the my trouble beginns.
I can't make up a logical network that tells the filter inserter has enough eg. repair packs but still should grab turrets and so on.
You could make up some ORed conditions (grab things as long as there is still something missing) but this will not work because the filter insert would happily grab turrets even you have already 2k of them
but there is 1 repair pack missing.
What i need is a really smart filter inserter where i can set up not only WHAT to insert but also HOW MUCH based on some logic condition individually per every WHAT to grab.
I have some kind of awkward workaround:
unload the chest with a filter inserter onto a belt, from there grab with another filter inserter (one for each different stuff i need) connected to a logic network (for the numbers) AND let the belt be unloaded into the chest again.
Where do i use this:
My mining outposts are automatically supported with defensive goods in the very first waggon of each train. The waggon is filled in my production central with various turrets, ammo, repair packs and stuff.
AND i have some general purpose trains which visit all outposts and restock their needed supply.
At an outpost i set up this workaround to unload only the needed amount of goods -- e voila -- automated, electrified, defended outpost.
BTW: My outposts are pretty far away so there is no direct connection to them but trains. I'm just figuring how to notice if a specific outpost is depleted in a CENTRAL unloading station and signaling that by some display?
Hope this wasn't answered elsewhere - search results were negative.
EDIT:
I think i nailed it now:
What i want is an inserter which works (roughly) like that on belts:
Phase 1) Identify what will be picked next (or empty) -> send to logic
Phase 2) Pick on yes/no from logic
Phase 3) Use standard rules for dropping
For chests and the like we need phase 1.5
1.5) logic can signal to "move over to next stack to pick from" or more general "move to stack #n"
In short words my inserter would have a reverted workflow where the (outside) logic decides what to do and not the inserter is telling the logic what it has done.