This commit is contained in:
AlgorithmX2
2014-04-16 23:39:03 -05:00
6 changed files with 40 additions and 8 deletions
@@ -80,7 +80,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
myScrollBar = new GuiScrollbar(); myScrollBar = new GuiScrollbar();
repo = new ItemRepo( myScrollBar, this ); repo = new ItemRepo( myScrollBar, this );
xSize = 195; xSize = 185;
ySize = 204; ySize = 204;
if ( te instanceof IViewCellStorage ) if ( te instanceof IViewCellStorage )
@@ -129,7 +129,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override @Override
public void initGui() public void initGui()
{ {
maxRows = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE; maxRows = getMaxRows();
perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((width - standardSize) / 18); perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((width - standardSize) / 18);
int NEI = 0; int NEI = 0;
@@ -181,9 +181,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
.getSetting( Settings.SEARCH_MODE ) ) ); .getSetting( Settings.SEARCH_MODE ) ) );
offset += 20; offset += 20;
buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings if ( !(this instanceof GuiMEPortableCell ) )
.getSetting( Settings.TERMINAL_STYLE ) ) ); {
buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings
.getSetting( Settings.TERMINAL_STYLE ) ) );
}
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT ); searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
searchField.setEnableBackgroundDrawing( false ); searchField.setEnableBackgroundDrawing( false );
searchField.setMaxStringLength( 25 ); searchField.setMaxStringLength( 25 );
@@ -295,7 +298,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
bindTexture( getBackground() ); bindTexture( getBackground() );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
if ( viewCell || ( this instanceof GuiSecurity))
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
for (int x = 0; x < rows; x++) for (int x = 0; x < rows; x++)
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 ); this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
@@ -367,4 +372,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
return repo.hasPower(); return repo.hasPower();
} }
int getMaxRows()
{
return AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE;
}
} }
@@ -9,7 +9,11 @@ public class GuiMEPortableCell extends GuiMEMonitorable
public GuiMEPortableCell(InventoryPlayer inventoryPlayer, IPortableCell te) { public GuiMEPortableCell(InventoryPlayer inventoryPlayer, IPortableCell te) {
super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, null ) ); super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, null ) );
maxRows = 3;
} }
@Override
int getMaxRows()
{
return 3;
}
} }
+4 -1
View File
@@ -20,7 +20,10 @@ public class GuiSecurity extends GuiMEMonitorable
super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) ); super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) );
customSortOrder = false; customSortOrder = false;
reservedSpace = 33; reservedSpace = 33;
xSize += 50;
// increase size so that the slot is over the gui.
xSize += 56;
standardSize = xSize;
} }
GuiToggleButton inject, extract, craft, build, security; GuiToggleButton inject, extract, craft, build, security;
+1
View File
@@ -51,6 +51,7 @@ public class AppEng
"after:gregtech_addon;after:Mekanism;after:IC2;after:ThermalExpansion;after:BuildCraft|Core;" + "after:gregtech_addon;after:Mekanism;after:IC2;after:ThermalExpansion;after:BuildCraft|Core;" +
// depend on version of forge used for build. // depend on version of forge used for build.
"required-after:AppliedEnergistics2-Core;" +
"required-after:Forge@[" // require forge. "required-after:Forge@[" // require forge.
+ net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion + net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion
+ net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion + net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion
@@ -33,6 +33,8 @@ public class PartCraftingTerminal extends PartTerminal implements IAEAppEngInven
@Override @Override
public void getDrops(List<ItemStack> drops, boolean wrenched) public void getDrops(List<ItemStack> drops, boolean wrenched)
{ {
super.getDrops(drops, wrenched);
for (ItemStack is : craftingGrid) for (ItemStack is : craftingGrid)
if ( is != null ) if ( is != null )
drops.add( is ); drops.add( is );
+12
View File
@@ -1,5 +1,7 @@
package appeng.parts.reporting; package appeng.parts.reporting;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -37,6 +39,16 @@ public class PartTerminal extends PartMonitor implements ITerminalHost, IConfigM
cm.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING ); cm.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
} }
@Override
public void getDrops(List<ItemStack> drops, boolean wrenched)
{
super.getDrops(drops, wrenched);
for (ItemStack is : viewCell)
if ( is != null )
drops.add( is );
}
@Override @Override
public void readFromNBT(NBTTagCompound data) public void readFromNBT(NBTTagCompound data)
{ {