Arithmetic Combinators: Constants only as 2nd op

Post all other topics which do not belong to any other category.
Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 299
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Arithmetic Combinators: Constants only as 2nd op

Post by Jürgen Erhard »

I've looked at FFF 88, but I see no rationale for why only the second combinator can be a number.

I've a pattern for loading bots into roboports (thankfully, we can now read the numbers), and that, for the main base, has a constant comb with the numbers of bots I want (two items in it, construction and logistics bots) and two arith combs to calculate the number of bots of each type I still need, which then set a requester chest.

But for an outpost, I don't want to be that elaborate, so just one arith for construction bots would suffice. Only... I need arith and const comb, because I cannot code "N - number of construction bots" with just one arith comb. I could code "number of bots - N"... and then negate this with a second arith comb.

And the combinators are too big anyway... :P
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Arithmetic Combinators: Constants only as 2nd op

Post by DaveMcW »

Roboport (Logisitic robot signal, Construction robot signal)
|
Arithmetic combinator (Each * -1 → Each)
|
Constant combinator (Logistic robot demand, Construction robot demand)
|
Requester chest
Post Reply

Return to “General discussion”