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

ender fluid cover #2505

Open
wants to merge 7 commits into
base: 1.20.1
Choose a base branch
from
Open

ender fluid cover #2505

wants to merge 7 commits into from

Conversation

Arborsm
Copy link
Contributor

@Arborsm Arborsm commented Dec 6, 2024

What

This PR adds ender cover system.


Implementation Details

The implementation includes new classes for virtual cover.


Outcome

Players can now create customized virtual tanks for fluid management, enhancing the gameplay experience.


Additional Information

show channel list is not finished, I can't make it work in server...

# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/common/data/GTItems.java
@Arborsm Arborsm requested a review from a team as a code owner December 6, 2024 15:02
@screret screret changed the title ender fluid cover imp ender fluid cover Dec 6, 2024
@screret screret added the type: feature New feature or request label Dec 6, 2024
Comment on lines +142 to +188
// damn I can't make the list panel work in the server side
// private SelectableWidgetGroup createVisualTankWidget(VisualTank tank, int y) {
// final int TOTAL_WIDTH = 116;
// final int BUTTON_SIZE = 20;
// final int MARGIN = 2;
//
// int currentX = 0;
// int availableWidth = TOTAL_WIDTH - BUTTON_SIZE + MARGIN;
//
// SelectableWidgetGroup channelGroup = new SelectableWidgetGroup(0, y, TOTAL_WIDTH, BUTTON_SIZE){
// @Override
// public void drawInForeground(@NotNull GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) {
// super.drawInForeground(graphics, mouseX, mouseY, partialTicks);
// if (super.isSelected)
// DrawerHelper.drawBorder(graphics, getPositionX(), getPositionY(), TOTAL_WIDTH, BUTTON_SIZE, 0xFFFFFFFF, 1);
// }
// };
// var name = tank.getVirtualTank().getColorStr();
//
// // Color block
// channelGroup.addWidget(new ColorBlockWidget(currentX, 0, BUTTON_SIZE, BUTTON_SIZE)
// .setCurrentColor(tank.getVirtualTank().getColor()));
// currentX += BUTTON_SIZE + MARGIN;
//
// // Text box
// int textBoxWidth = availableWidth;
// textBoxWidth -= BUTTON_SIZE + MARGIN;
// if (tank.getFluidAmount() == 0) {
// textBoxWidth -= BUTTON_SIZE + MARGIN;
// }
// channelGroup.addWidget(
// new TextBoxWidget(currentX, 6, textBoxWidth, List.of(name)).setCenter(true));
// currentX += textBoxWidth + MARGIN;
//
// // Tank slot
// channelGroup.addWidget(new TankWidget(tank, currentX, 0,
// BUTTON_SIZE, BUTTON_SIZE, false, false)
// .setBackground(GuiTextures.FLUID_SLOT));
// currentX += BUTTON_SIZE + MARGIN;
//
// // Remove button (if tank is empty)
// if (tank.getFluidAmount() == 0) {
// channelGroup.addWidget(new ButtonWidget(currentX, 0, BUTTON_SIZE, BUTTON_SIZE,
// GuiTextures.BUTTON_INT_CIRCUIT_MINUS, cd -> removeChannel(tank)));
// }
// return channelGroup;
// }
Copy link
Member

Choose a reason for hiding this comment

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

we'll figure out a solution here

@screret
Copy link
Member

screret commented Dec 12, 2024

conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants