Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digiline Filter Ejector doesn't eject n Items x in slot m, if there is also a slot < m, with < n items x. #15

Open
FaberUnserzeit opened this issue Mar 5, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@FaberUnserzeit
Copy link

FaberUnserzeit commented Mar 5, 2022

If there are two or more slots with the same item name, where the first of these slots has less items than the second one, you can only eject the second stack or parts of it, if you prior to this eject the first stack.
To reproduce this, place a chest, a digiline ejector and a chest in a row, connect the ejector to a lua-controller, put 49 cobble into the first slot of the left chest and 99 cobble into another slot. Name the ejector's channel "eject" and run the LUA-controller with the following code:

if (event.type=="program") then
   local m =
   {
      exmatch = true,
      name = "default:cobble",
      count = 50,
   }
   digiline_send("eject",m)
end

or alternatively:

if (event.type=="program") then
   local m = "default:cobble 50"
   digiline_send("eject",m)
end

Edit: note: random slotseq sometimes leads to successful ejecting.

@The4codeblocks
Copy link

I had this issue when coding a withdrawal system for drawer controllers.
A quick fix would be checking how many items were ejected and ejecting the remainder from another slot.

@SwissalpS
Copy link
Contributor

checking how many items were ejected and ejecting the remainder from another slot.

Yes, that's basically how I do it in-game. A digiline detector tube at output to verify if and how much was ejected.

But we will make the ejectors more inteligent, once we find the time to do so :D

@The4codeblocks
Copy link

checking how many items were ejected and ejecting the remainder from another slot.

Yes, that's basically how I do it in-game. A digiline detector tube at output to verify if and how much was ejected.

But we will make the ejectors more intelligent, once we find the time to do so :D

I meant for my solution to be applied in the injector code, but this is also a quick fix.

once we find the time to do so :D

Or we get a contributor to do it :D

@SwissalpS
Copy link
Contributor

injectors use a lot of time already. We need some kind of cache to speed things up. Once we have that, this should also be easier to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants