Storage Bus can now optionally show inaccessible items.

This commit is contained in:
AlgorithmX2
2014-08-13 00:32:43 -05:00
parent 2d12ffc304
commit bcdc47622c
4 changed files with 31 additions and 3 deletions
+12 -1
View File
@@ -11,6 +11,7 @@ import appeng.api.config.AccessRestriction;
import appeng.api.config.ActionItems;
import appeng.api.config.FuzzyMode;
import appeng.api.config.Settings;
import appeng.api.config.StorageFilter;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.implementations.ContainerStorageBus;
@@ -27,6 +28,7 @@ public class GuiStorageBus extends GuiUpgradeable
{
GuiImgButton rwMode;
GuiImgButton storageFilter;
GuiTabButton priority;
GuiImgButton partition;
GuiImgButton clear;
@@ -51,6 +53,9 @@ public class GuiStorageBus extends GuiUpgradeable
if ( fuzzyMode != null )
fuzzyMode.set( cvb.fzMode );
if ( storageFilter != null )
storageFilter.set( ((ContainerStorageBus) cvb).storageFilter );
if ( rwMode != null )
rwMode.set( ((ContainerStorageBus) cvb).rwMode );
}
@@ -61,10 +66,12 @@ public class GuiStorageBus extends GuiUpgradeable
clear = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
partition = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
rwMode = new GuiImgButton( this.guiLeft - 18, guiTop + 48, Settings.ACCESS, AccessRestriction.READ_WRITE );
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 68, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
storageFilter = new GuiImgButton( this.guiLeft - 18, guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTACTABLE_ONLY );
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
buttonList.add( storageFilter );
buttonList.add( fuzzyMode );
buttonList.add( rwMode );
buttonList.add( partition );
@@ -94,6 +101,10 @@ public class GuiStorageBus extends GuiUpgradeable
else if ( btn == rwMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
else if ( btn == storageFilter )
NetworkHandler.instance.sendToServer( new PacketConfigButton( storageFilter.getSetting(), backwards ) );
}
catch (IOException e)
{
+9
View File
@@ -23,6 +23,7 @@ import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
import appeng.api.config.StorageFilter;
import appeng.api.config.TerminalStyle;
import appeng.api.config.ViewItems;
import appeng.api.config.YesNo;
@@ -176,6 +177,14 @@ public class GuiImgButton extends GuiButton implements ITooltip
registerApp( 16 * 1 + 3, Settings.CRAFT_ONLY, YesNo.YES, ButtonToolTips.Craft, ButtonToolTips.CraftOnly );
registerApp( 16 * 1 + 2, Settings.CRAFT_ONLY, YesNo.NO, ButtonToolTips.Craft, ButtonToolTips.CraftEither );
registerApp( 16 * 11 + 2, Settings.CRAFT_VIA_REDSTONE, YesNo.YES, ButtonToolTips.EmitterMode, ButtonToolTips.CraftViaRedstone );
registerApp( 16 * 11 + 1, Settings.CRAFT_VIA_REDSTONE, YesNo.NO, ButtonToolTips.EmitterMode, ButtonToolTips.EmitWhenCrafing );
registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems,
ButtonToolTips.ReportInaccessibleItemsNo );
registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems,
ButtonToolTips.ReportInaccessibleItemsYes );
}
}