Circuit Network - Separate Signal with Identical Item Count
Posted: Wed Apr 19, 2017 12:18 pm
I have a signal containing two items of identical count. How do I separate them so I have one item output from one combinator, and the other item on another?
i.e. 1 Signal of n unique items => N signals of 1 unique item.
Limitation: Use virtual signals only. No explicit item signals, as it should handle any input signal and respond to changes.
Use case: Take a 'crafting materials' signal and send each item to its filter inserter. Crafting materials signal would indicate the materials required to assemble some item, and it would come the Crafting Combinator mod, for example.
Note: this becomes a problem when there are two items with identical count, and I don't think there's a way to do that.
e.g. Input signal of 2 copper plates and 2 iron plates
Result should have 2 different signals sent to 2 filter inserters, one with copper plates and the other being iron plates.
One way I can see this working is by sending the input through a decider combinator that returns 1 item count (EACH > 0 => EACH(1)), and summing it with a Constant Combinator that has a unique item count for every single item that may be encountered in the input signal. That way each item has a unique count.
A second way is by using a smart inserter to pick up objects in a chest and pulse the item. Then subtract that item from the filter. I've tried working on that, but it is difficult.
It's almost as if I need an item indexer operation on the decider combinator, or something. I'm not sure the new 0.15 additions would help either
i.e. 1 Signal of n unique items => N signals of 1 unique item.
Limitation: Use virtual signals only. No explicit item signals, as it should handle any input signal and respond to changes.
Use case: Take a 'crafting materials' signal and send each item to its filter inserter. Crafting materials signal would indicate the materials required to assemble some item, and it would come the Crafting Combinator mod, for example.
Note: this becomes a problem when there are two items with identical count, and I don't think there's a way to do that.
e.g. Input signal of 2 copper plates and 2 iron plates
Result should have 2 different signals sent to 2 filter inserters, one with copper plates and the other being iron plates.
One way I can see this working is by sending the input through a decider combinator that returns 1 item count (EACH > 0 => EACH(1)), and summing it with a Constant Combinator that has a unique item count for every single item that may be encountered in the input signal. That way each item has a unique count.
A second way is by using a smart inserter to pick up objects in a chest and pulse the item. Then subtract that item from the filter. I've tried working on that, but it is difficult.
It's almost as if I need an item indexer operation on the decider combinator, or something. I'm not sure the new 0.15 additions would help either