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

Feature: Add Advanced Blocking Card for interfaces #308

Merged
merged 2 commits into from May 2, 2023

Conversation

firenoo
Copy link

@firenoo firenoo commented May 2, 2023

Purpose: In blocking mode, a ME interface will not push items into its target if it has items in it. If the target is another ME interface, blocking mode looks only at the 9 slot inventory. The advanced blocking card changes this to include check for items in the underlying ME system.

Usage: The card is added to the TARGET interface, i.e. the interface that will be receiving items. Currently, the card is not allowed in P2P interfaces because I'm afraid of bugs/unexpected behavior.

See GTNewHorizons/GT-New-Horizons-Modpack#12950

Will need some work on AE2FC to add compat for dual interface side too. The idea is that the setup in the linked issue seems common enough to warrant this "QOL" - at a cost.

@firenoo firenoo requested review from a team May 2, 2023 05:29
@repo-alt
Copy link
Collaborator

repo-alt commented May 2, 2023

Good idea in general, theoretically there may also be an advanced version of that card including a filter of the items to ignore in the blocking mode, which would remove the necessity of the ugly workaround in the interface block mode support.

Purpose: In blocking mode, a ME interface will not push items into its
target if it has items in it. If the target is another ME interface,
blocking mode looks only at the 9 slot inventory. The advanced blocking
card changes this to include check for items in the underlying ME system.

Usage: The card is added to the TARGET interface, i.e. the interface that
will be receiving items. Currently, the card is not allowed in P2P
interfaces because I'm afraid of bugs/unexpected behavior.
@firenoo
Copy link
Author

firenoo commented May 2, 2023

I'm not entirely sold on checking the target inventory for specific items to block on, let alone the entire ME system, for certain items. Would like a use case before implementing that.

@firenoo firenoo requested a review from repo-alt May 2, 2023 14:07
@repo-alt
Copy link
Collaborator

repo-alt commented May 2, 2023

Blocking exceptions are selector circuits, engraver lenses - different use case.

repo-alt
repo-alt previously approved these changes May 2, 2023
@firenoo
Copy link
Author

firenoo commented May 2, 2023

I see what you mean. Okay, that will be the next feature; this is somewhat less useful at the moment unless those are hidden. Alternative is to use insert mode only for storage buses.

@firenoo
Copy link
Author

firenoo commented May 2, 2023

Actually just tested the storage buses, and it seems to work when on insert only mode in that case, but it also breaks the whole blocking mode thing... Let me switch this PR up. The Basic Blocking Card will have the current behavior, but the advanced one will check for gregtech circuits. Not sure how to customize it. we can put this as a setting since they are mutually exclusive behaviors actually.

@firenoo firenoo dismissed repo-alt’s stale review May 2, 2023 14:32

Reimplementing the feature

@Ydrec
Copy link

Ydrec commented May 2, 2023

Would this be able in any way work with interface different item placing modes (empty slots first mode)? The use case would be directly eliminating the need to rename items in lines to prevent the same items stacking.

@Ydrec
Copy link

Ydrec commented May 2, 2023

advanced version of that card including a filter of the items to ignore in the blocking mode, which would remove the necessity of the ugly workaround in the interface block mode support.

Wouldn't it be better to make a separate card specifically for the outputting interface, which you can partition in the cell workbench to select which items to count for blocking or ignore (using inverse card as add-on to it?) So you don't need to make a chunky subnet setup to just set ignored items.
Probably not even as a new card but as a new function to the view cell since it already has filtering in workbench code.

@firenoo
Copy link
Author

firenoo commented May 2, 2023

Would this be able in any way work with interface different item placing modes (empty slots first mode)? The use case would be directly eliminating the need to rename items in lines to prevent the same items stacking.

The card does not interfere with that. It only changes when items are sent when blocking is enabled, not how they are sent.

@github-actions
Copy link

github-actions bot commented May 2, 2023

Warning: 2 uncommitted changes
#309

Advanced Blocking Mode is now a setting to toggle between two modes:

- Default: Exhibits the same behavior as normal blocking mode, ignores
circuits.

- Any: Blocks on any item, including circuits. I'm leaving this here in
case of some niche behavior someone might want, but the use case is very
uncommon (maybe some weird jig with taking circuits on demand...).
Copy link
Collaborator

@repo-alt repo-alt left a comment

Choose a reason for hiding this comment

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

This is rather ugly solution (yes I remember that I used it myself and still), but if you don't wish to bother with the real filter, then so be it

@Dream-Master Dream-Master merged commit ec7f1d2 into master May 2, 2023
1 check passed
@Dream-Master Dream-Master deleted the blocking_upgrade branch May 2, 2023 18:46
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.

None yet

4 participants