[0.15.32] Empty chest incorrectly evaluates inserter logic
Posted: Fri Aug 04, 2017 1:31 am
Summary: The inserter with enabled condition: Everthing>3000 incorrectly evaluates to true when the chest is empty, causing the inserter to remove the first item placed in the chest.
1. What I did:
I set up a system with inerters, the circuit network, and the logistic network as in the screenshot.

The Idea is to draw items in when low, and emit them when they are too high, with the filter inserter connected to my "sorting belt".
In the center is a Passive Provider Chest.
The Fast Inserter on the left, which puts items from the belt into the chest, is set only to enable/disable from the circuit network, not to read hand contents. The enabled condition is Everything<2000.
The Fast Inserter on the top, which puts items from the chest onto the belt, is set only to enable/disable from the circuit network, not to read hand contents. The enabled condition is Everything>3000.
The Filter Inserter on the right, which pulls items from the belt into the chest, is set only to set filters via the circuit network, not to read hand contents or enable/disable.
The Chest and three inserters are connected to each other to make a small isolated circuit network, using the red wire.
2. What Happened:
When the chest is empty, the top inserter evaluates "Everything>3000" to be true. As a consequence, it will remove items from the chest as they are put into it, preventing the items from staying inside and accumulating.
The inserter on the left will grab an item from the belt, and put it into the chest. The top inserter will grab the item before it's logic condition is checked again, removing the item from the chest and places it onto the belt.
3. What I expected to happen:
I expected that the top inserter's logic condition of "Everything>3000" to evaluate to false when the chest is empty, or has a null item list or whathaveyou.
If the top inserter was disabled on the empty chest, it wouldn't remove the first item placed in the chest. Removing the first item placed in the chest is unexpected because the inserter was active when there were fewer than 3000 items in the chest.
If there is more than one item in the chest, everything works as expected.
1. What I did:
I set up a system with inerters, the circuit network, and the logistic network as in the screenshot.
The Idea is to draw items in when low, and emit them when they are too high, with the filter inserter connected to my "sorting belt".
In the center is a Passive Provider Chest.
The Fast Inserter on the left, which puts items from the belt into the chest, is set only to enable/disable from the circuit network, not to read hand contents. The enabled condition is Everything<2000.
The Fast Inserter on the top, which puts items from the chest onto the belt, is set only to enable/disable from the circuit network, not to read hand contents. The enabled condition is Everything>3000.
The Filter Inserter on the right, which pulls items from the belt into the chest, is set only to set filters via the circuit network, not to read hand contents or enable/disable.
The Chest and three inserters are connected to each other to make a small isolated circuit network, using the red wire.
2. What Happened:
When the chest is empty, the top inserter evaluates "Everything>3000" to be true. As a consequence, it will remove items from the chest as they are put into it, preventing the items from staying inside and accumulating.
The inserter on the left will grab an item from the belt, and put it into the chest. The top inserter will grab the item before it's logic condition is checked again, removing the item from the chest and places it onto the belt.
3. What I expected to happen:
I expected that the top inserter's logic condition of "Everything>3000" to evaluate to false when the chest is empty, or has a null item list or whathaveyou.
If the top inserter was disabled on the empty chest, it wouldn't remove the first item placed in the chest. Removing the first item placed in the chest is unexpected because the inserter was active when there were fewer than 3000 items in the chest.
If there is more than one item in the chest, everything works as expected.

