Bug in "For Each Loop".
Proha5 opened this issue ยท 3 comments
Sorry for bad english.
Let create logic using loop:
Input 1 stone from chest A1. Output to chest B.
Input 1 stone from chest A2. Output to chest B.
I declarate 2 vars:
Var "white". (Chest A1 + Chest A2)
Var "Black".
Triggered by press button.
---->
ForEach(List: White, Element: Black.)
---->
Input from var: "black". Select white list. Count stones: 1.
---->
Output to chest B.
Try run.. and chest A1 no lost items! Chest A2 lost 2 items. (instead 1)
If both chest contains 1 item then works fine.
I think the issue is happening because that when an input or output is set to 'blacklist', if there is a stacksize specified then it will still move items. I think the intention was that you could use the blacklist as a way to 'keep X items in here', but it seems to be broken.
For me, this kind of setup is working as expected
but if an input or output is set to blacklist but a quantity is still specified then things don't work.
In the meantime I'll probably make the blacklist properly ignore items even if they have a quantity, since it's a lot harder to fix the intended functionality
I think the issue is happening because that when an input or output is set to 'blacklist'
Not. I never use black list with specify amount.
The issue appear with "output" with empty filter (empty black list), no specify amount. "Input" have white list.
My settings in "foreach":
Input = White list: Stone. Amount: 1.
Output = Empty black list. (output any items, any amount)
You tried this setting? This settings should reproduce bug.
I simulated loop no using foreach:
Input from chest-1. White list: Stone. Amount: 1.
--->
Output = empty black list.
--->
Input from chest-2. White list: Stone. Amount: 1.
--->
Output = empty black list.
Works fine! Chest A1 and A2 reduced by -1. But if use foreach, then first chest reduced by -2. Second chest no have change. The bug present only in "foreach".
I'll probably make the blacklist properly ignore items even if they have a quantity, since it's a lot harder
Somebody use blacklist filter with quantity? Its no sense.