TL;DR
A new mode for the selector combinator to output all the ingredients for the recipes on its input.What?
A new "total ingredients" mode for the selector combinator. It outputs the total ingredients needed to craft the items on its input, in quantities given by the signal values. For example, if the input is 10 red science and 1 red belt, then the output is:(10 iron gears + 10 copper plates) + (1 yellow belt + 5 iron gears) = (15 iron gears + 10 copper plates + 1 yellow belt).
Items with no ingredients would output themselves, e.g. 100 iron ore would be output as 100 iron ore.
An item signal and its recipe signal would give the same output. Items with multiple recipes would use a default, and different recipe(s) could be sent specifically if needed.
Technologies would output the total science needed.
Recipes that produce multiples of their product would round up to the nearest multiple of the recipe inputs. For example, 3 yellow belt would output 2 iron plate + 2 iron gear.
A productivity bonus could be provided on the P signal and would be taken into account, making the assumption that the productivity bar is initially empty.
Why?
It's not just duplicative with the "read recipe" function on crafting entities, because it can work without the appropriate entity to read from. One great use would be to get the total materials needed for a logistic group, set on a constant combinator. Because items without ingredients return themselves, this function could be used repeatedly to calculate raw material requirements if desired.This idea came to me while considering another suggestion for reading the current research and doing something different depending on whether Agricultural Science is used, and would enable half of that ability. (The other half being reading the research queue from labs.)