Page 1 of 1

Allow the "ANY" wildcard in the "set inserter stack size" inserter circuit setting.

Posted: Mon Apr 26, 2021 8:16 pm
by tzwaan
Found this suggestion originally in this thread, but since that original suggestion was already implemented, this should receive its own thread.
TL;DR
Allow the stack size of inserters to be set via the circuit network using the "ANY" wildcard instead of specifying a specific signal, which would allow setting both the filter and the stack size using a single signal.

What ?
Recently the "ANY" wildcard was added as an output to the decider combinator, allowing us to get a single signal from a full frame of signals.
Used in this way, the wildcard has the same behavior as the "set filter" operation on filter inserters (assuming a single slot).
However, setting the stack size of that same inserter can currently only be done through a single fixed signal.

I suggest allowing the "ANY" wildcard to be used to set the inserter stack size. It would then pick the signal it uses in the same way as the other uses of the "ANY" output wildcard.

By doing this we can specify both a filter as well as the stack size using a single signal.

In the case of a filter inserter with multiple filter slots, there is an implementation choice to be made.
1 - The consistent behavior with the other uses of ANY would be to always pick the stack size of the item that would be selected by ANY, even if the item the inserter is picking up is from a latter filter slot.
2 - The choice could be made to base the stack size on the actual item that the inserter is picking up, so it always matches the right signal even when multiple filters are set.

I would personally go with option 1 for internal consistency (and probably also ease of implementation).
Why ?
There are currently many combinator applications where we want to set both the filter and the stack size based on certain conditions. This change would allow us to combine the filter and stack size signals into 1, allowing us to have a full configuration of filter/size combinations in a single frame of signals.
On top of that, this change does not impact current existing behaviors, so it would not break anything.

Re: Allow the "ANY" wildcard in the "set inserter stack size" inserter circuit setting.

Posted: Tue Apr 27, 2021 6:14 am
by ssilk
This is quite similar
viewtopic.php?f=6&t=62189 "Each" Signal Choice as Stack Size Control Signal

I would like to explain me the difference between both. :)

Re: Allow the "ANY" wildcard in the "set inserter stack size" inserter circuit setting.

Posted: Tue Apr 27, 2021 8:28 am
by Nidan
Each != Any, obviously ;)

The "each" suggestion would solve OP's problem, since, if I understood OP correctly, there would only be one signal on the wire. But the same can already be accomplished by adding an arithmetic "each + 0 -> S" (or any other virtual signal) between the decider and the inserter.

Re: Allow the "ANY" wildcard in the "set inserter stack size" inserter circuit setting.

Posted: Tue Apr 27, 2021 5:59 pm
by ssilk
Thanks.

Re: Allow the "ANY" wildcard in the "set inserter stack size" inserter circuit setting.

Posted: Tue Apr 27, 2021 6:47 pm
by NotRexButCaesar
Nidan wrote:
Tue Apr 27, 2021 8:28 am
But the same can already be accomplished by adding an arithmetic "each + 0 -> S" (or any other virtual signal) between the decider and the inserter.
Not exactly. That will add a one tick delay. You need an additional each + 0 combinator to make sure the signal and stack size concur.