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

Remove Distinct functionality from Output Parts #2386

Merged
merged 4 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface IDistinctPart extends IMultiPart {

@Override
default void attachConfigurators(ConfiguratorPanel configuratorPanel) {
IMultiPart.super.attachConfigurators(configuratorPanel);
superAttachConfigurators(configuratorPanel);
configuratorPanel.attachConfigurators(new IFancyConfiguratorButton.Toggle(
GuiTextures.BUTTON_DISTINCT_BUSES.getSubTexture(0, 0.5, 1, 0.5),
GuiTextures.BUTTON_DISTINCT_BUSES.getSubTexture(0, 0, 1, 0.5),
Expand All @@ -34,4 +34,8 @@ default void attachConfigurators(ConfiguratorPanel configuratorPanel) {
.append(Component.translatable(pressed ? "gtceu.multiblock.universal.distinct.yes" :
"gtceu.multiblock.universal.distinct.no")))));
}

default void superAttachConfigurators(ConfiguratorPanel configuratorPanel) {
IMultiPart.super.attachConfigurators(configuratorPanel);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public Widget createUIWidget() {

@Override
public boolean isDistinct() {
return super.isDistinct() && tank.isDistinct();
return io != IO.OUT && super.isDistinct() && tank.isDistinct();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void onUnload() {

@Override
public boolean isDistinct() {
return getInventory().isDistinct() && circuitInventory.isDistinct();
return io != IO.OUT && getInventory().isDistinct() && circuitInventory.isDistinct();
}

@Override
Expand Down Expand Up @@ -193,8 +193,10 @@ public void setWorkingEnabled(boolean workingEnabled) {
//////////////////////////////////////

public void attachConfigurators(ConfiguratorPanel configuratorPanel) {
IDistinctPart.super.attachConfigurators(configuratorPanel);
if (this.io == IO.IN) {
if (this.io == IO.OUT) {
IDistinctPart.super.superAttachConfigurators(configuratorPanel);
} else if (this.io == IO.IN) {
IDistinctPart.super.attachConfigurators(configuratorPanel);
configuratorPanel.attachConfigurators(new CircuitFancyConfigurator(circuitInventory.storage));
}
}
Expand Down