jeremiahwinsley / ExMachinis

MIT License
2 stars 1 forks source link

Flux Sieve Voiding Output #18

Closed Trennor276 closed 1 year ago

Trennor276 commented 1 year ago

Playing the current release of Seaopolis 2. Noticed that if my output inventory was full that my input material was still being used by the Flux Sieve.

How to replicate: 1) Place down Flux Sieve 2) Place in a mesh 3) Provide power 4) Set output location using hammer 5) Set chest or output inventory against output side of Flux Sieve 6) Fill chest with random items until full 7) Provide input material

Flux Sieve will use input material as if it is processing it, but it has no place to put the output. If Flux Sieve is broken, no "processed" materials are dropped in would as if from an internal buffer. Items are voided both on output and from breaking the block.

jeremiahwinsley commented 1 year ago

This is intentional - unlike the hammer, the sieve's drops are random. You can use a redstone comparator to disable the sieve when the buffer is full.

If it only consumed input when there was room in the output, then you could exploit it by filling the output with desired drops, and it would only use up the input if it successfully rolled that drop.

The alternate fix is an internal buffer to catch overflow, but this makes the process more complicated and also less obvious what's happening, if your machine stops because there are items in an internal invisible buffer.

This void mechanic also makes it easy if you, for example, only need a few drops from a specific material, and place it on top of a drawer with locked drawers. It would fill the drawers and void any overflow.

Jack-McKalling commented 1 year ago

I respectfully disagree. The flux sieve should fail a process if ANY of the result items cannot be stored in the output. So even if you desired e.g. redstone dust from the input, and filtered an output drawer for exclusively redstone dust, it should still fail the operation if there's also a chance for a different item from the input recipe. In other words, treat all possible outputs for a particular input item as 100% chance, even if they aren't. Then you can safely prevent voiding.

Voiding anything the user doesn't want is easy enough externally. Drawers can have void upgrades, or you can export from drawers into trash cans. It is my opinion more important to preserve input when there happens to be no space left on the output, than it is for the sieve to serve as an auto voiding mechanic. The machine costs power, so letting it continue to work even if it can't, is very wasteful.

jeremiahwinsley commented 1 year ago

@Jack-McKalling I don't plan to change the default behavior, but if you'd like a config toggle for that (only running a cycle when all possible outputs can be inserted), I think that should be pretty easy to add. Please feel free to create an issue for that or any other configs you'd like.