Skip to content

Conversation

@rlking1985
Copy link

Added OutputSettings.useMax as a condition when transferring items which seems to fix the issue for the IO pusher (see video demo).

io-pusher-max-demo.mp4

//Transfre a item back if it is either too few or disallowed
if (currentItem != null && (!settings.AllowedToAccept(currentItem) || !OutputSettings.SatisfiesMin(currentItem.stackCount)) && boundStorageUnit.GetSettings.AllowedToAccept(currentItem))
// Transfer a item back if it is either too few or disallowed
if (currentItem != null && !OutputSettings.useMax && (!settings.AllowedToAccept(currentItem) || !OutputSettings.SatisfiesMin(currentItem.stackCount)) && boundStorageUnit.GetSettings.AllowedToAccept(currentItem))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it would break the min condition if you use the max condition.

Copy link
Collaborator

@Sn1p3rr3c0n Sn1p3rr3c0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this change fixes the issue outlined in #828 it introduces a new issue.
That would need to be resolved before merging.

image
IO SampleSave.zip

Attached is a sample Save File
The IO Port and IO Pusher are configured in the same way:

  • Minimum 10
  • Maximum 20
  • Allowed items: Steel

By activating the lower puller you can move one item at a time.
You can then observe that once the count dips below 10:

  • The IO Port correctly -> no longer outputs anything
  • The IO Pusher outputs less then the minimum

the IO Ports seem to take a completely separate codepath. maybe some refactoring is in order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants