mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
add wireless fluid terminal
This commit is contained in:
1 parent
482298021e
commit
a22814940b
19 files changed
+449
-23
No files matched your search
+5
@@ -13,6 +13,7 @@ import com.glodblock.github.common.parts.PartFluidPatternTerminalEx;
|
||||
import com.glodblock.github.common.parts.PartFluidTerminal;
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.item.WirelessTerminal;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.Ae2ReflectClient;
|
||||
|
||||
@@ -34,7 +35,10 @@ public class GuiFluidPatternTerminalCraftingStatus extends GuiCraftingStatus {
|
||||
Ae2ReflectClient.rewriteIcon(this, new ItemStack(ItemAndBlockHolder.FLUID_TERMINAL_EX, 1));
|
||||
else if (host instanceof PartFluidTerminal) {
|
||||
Ae2ReflectClient.rewriteIcon(this, new ItemStack(ItemAndBlockHolder.FLUID_TERM, 1));
|
||||
} else if (host instanceof WirelessTerminal) {
|
||||
Ae2ReflectClient.rewriteIcon(this, new ItemStack(ItemAndBlockHolder.WIRELESS_FLUID_TERM, 1));
|
||||
}
|
||||
|
||||
super.initGui();
|
||||
originalGuiBtn = Ae2ReflectClient.getOriginalGuiButton(this);
|
||||
}
|
||||
@@ -46,6 +50,7 @@ public class GuiFluidPatternTerminalCraftingStatus extends GuiCraftingStatus {
|
||||
else if (host instanceof PartFluidPatternTerminalEx)
|
||||
InventoryHandler.switchGui(GuiType.FLUID_PATTERN_TERMINAL_EX);
|
||||
else if (host instanceof PartFluidTerminal) InventoryHandler.switchGui(GuiType.FLUID_TERMINAL);
|
||||
else if (host instanceof WirelessTerminal) InventoryHandler.switchGui(GuiType.WIRELESS_FLUID_TERMINAL);
|
||||
} else {
|
||||
super.actionPerformed(btn);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import appeng.container.slot.AppEngSlot;
|
||||
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidPortableCell;
|
||||
import com.glodblock.github.inventory.item.IFluidPortableCell;
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
|
||||
public class GuiFluidPortableCell extends GuiFluidTerminal {
|
||||
|
||||
@@ -20,6 +21,10 @@ public class GuiFluidPortableCell extends GuiFluidTerminal {
|
||||
|
||||
@Override
|
||||
protected int getMaxRows() {
|
||||
return 3;
|
||||
if (this.container.getHost() instanceof IWirelessTerminal) {
|
||||
return super.getMaxRows();
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ import appeng.util.ConfigManager;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
|
||||
public abstract class FCContainerMonitor<T extends IAEStack<T>> extends AEBaseContainer
|
||||
implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<T> {
|
||||
|
||||
@@ -98,6 +100,7 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends AEBaseCo
|
||||
this.updatePowerStatus();
|
||||
final boolean oldAccessible = this.canAccessViewCells;
|
||||
this.canAccessViewCells = this.host instanceof WirelessTerminalGuiObject
|
||||
|| this.host instanceof IWirelessTerminal
|
||||
|| this.hasAccess(SecurityPermissions.BUILD, false);
|
||||
if (this.canAccessViewCells != oldAccessible) {
|
||||
for (int y = 0; y < 5; y++) {
|
||||
@@ -214,4 +217,8 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends AEBaseCo
|
||||
this.getGui().updateSetting(manager, settingName, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
public ITerminalHost getHost() {
|
||||
return this.host;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user