Applied-Energistics-2 icon indicating copy to clipboard operation
Applied-Energistics-2 copied to clipboard

Interface with multiple targets

Open ZeroInputCtrl opened this issue 7 years ago • 7 comments

When using the interface block and having multiple targets around it that can craft to, it seems that all items go to one of the targets before moving to the next one. It would be very helpful to have an option to round-robin (specifically only pushing one item to each before moving on to the second item for each etc.) this or maybe even an upgrade card for the interface to enable this.

ZeroInputCtrl avatar Nov 21 '17 16:11 ZeroInputCtrl

From what I remember from my last dive into the crafting code (so could be wrong), each recipe/pattern is done as a unit, so e.g. a recipe with 9 ingredients that you requested 99 of will be looped 99 times, not loop ingredient 1 x 99, then ingredient 2 x 99, etc.

Following that, if the first target will accept all the items in the pattern loop, it will get them all.

But yes, it is theoretically possible to force it to try the next target first the next time around.

thiakil avatar Nov 22 '17 00:11 thiakil

I don't think this is necessary, there's an option in the interfaces called "Blocking Mode" that prevents pushing items to machines if they already have contents... so basically it does exactly what the OP wanted. xD

2017-12-04_06 42 26

AcidKat avatar Dec 04 '17 06:12 AcidKat

Nope that doesn't work for a couple of reasons, If the machine takes multiple items to craft that will not end up crafting anything. Second reason is that some machines ignore that logic.

ZeroInputCtrl avatar Dec 04 '17 13:12 ZeroInputCtrl

To note, I tested this with the Inscribers and they aren't honoring blocking mode, nor do i think they should because of the fact that I have to keep the plates in there per inscriber.

ZeroInputCtrl avatar Dec 04 '17 13:12 ZeroInputCtrl

I'm fairly sure the interfaces should be able to use blocking mode even if the inscriber has a press in it, the fact that it ignores blocking mode makes me think that this is a bug rather than intended functionality...

Okay so I tested this with other machines, and it seems like item blocking mode doesn't actually work on the current version (rv5-beta-10), specifically with modded machines and seemingly the inscribers, gonna do some more testing and then post a new issue report on this, maybe a solution to this bug will help you fix this problem too.

AcidKat avatar Dec 04 '17 19:12 AcidKat

Even if the blocking mode was working as intended, wouldn't it still fail in the scenario that if i need to send 2 items into a machine at a time it would only send 1? I guess it would help to know the intended logic of blocking mode.

ZeroInputCtrl avatar Dec 04 '17 21:12 ZeroInputCtrl

I don't think so, I've used it in the past and I seem to remember it working for machines like the induction smelter etc...

I'm guessing it either checks for the items specific to the recipe and makes sure both can be entered before pushing them, or just pushes all required items at once and then waits for the machine to empty again... maybe a combination of both? I'm not sure.

As an example, you could have a recipe that combines 2 iron dust with 1 sand in an induction smelter, in an ideal scenario; item blocking would push 2 iron dust and 1 sand, then wait until the machine has finished processing before pushing another set of items.

In any case, I'm guessing the dev's ideal implementation of item blocking would account for things like this, so we'll just have to leave it up to them to decide how to go about it.

AcidKat avatar Dec 04 '17 21:12 AcidKat