I believe I have gotten close to a working prototype. The blueprint below works as such:
- The items on the belt in front of the chemical plant (various qualities of ice) are read and passed to the selector combinator
- The selector combinator uses the "quality transfer" feature to transfer the quality of the ice to the ice melting signal. (There is a constant combinator emitting the ice melting signal.)
- The quality ice melting signal is passed to a decider combinator which (I thought) acts as a latch that holds onto the first signal it receives until reset.
- The output of the aforementioned decider combinator is used to set the recipe on the chemical plant.
- The contents of the chemical plant, the recipe finished signal, and the contents of the inserter feeding the plant and read and fed into another decider combinator.
- This second decider combinator only outputs the reset signal (which resets the first decider combinator that is acting as a latch) when a recipe has just finished and no ice of any quality is present in the inserter or the chemical plant.
I am open to any suggestions to fix my design, as well as to any simpler designs. I am somewhat frustrated that adding quality to ice provides no benefits, but results in strange problems like this. A simple way to strip quality off the ice, or allow the chemical plant to accept any quality of ice, would nullify the need for this device.