Skip to content

Commit a7e81c1

Browse files
committed
Filter control button (if present) overlaps fuzzy control
Oredictionary card disables other filter slots Fixed too long GUI text
1 parent 5340365 commit a7e81c1

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

src/main/java/appeng/client/gui/implementations/GuiStorageBus.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected void addButtons()
6161
this.rwMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.ACCESS, AccessRestriction.READ_WRITE );
6262
this.storageFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
6363
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
64-
this.oreFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 108, Settings.ACTIONS, ActionItems.ORE_FILTER);
64+
this.oreFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.ACTIONS, ActionItems.ORE_FILTER);
6565

6666
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
6767

src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected void addButtons()
8181
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
8282
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
8383
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
84-
this.oreFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.ACTIONS, ActionItems.ORE_FILTER);
84+
this.oreFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.ACTIONS, ActionItems.ORE_FILTER);
8585

8686
this.buttonList.add( this.craftMode );
8787
this.buttonList.add( this.redstoneMode );
@@ -142,7 +142,7 @@ protected void handleButtonVisibility()
142142
}
143143
if( this.fuzzyMode != null )
144144
{
145-
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
145+
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 && this.bc.getInstalledUpgrades( Upgrades.ORE_FILTER ) == 0);
146146
}
147147
if( this.craftMode != null )
148148
{

src/main/java/appeng/container/implementations/ContainerStorageBus.java

+6-9
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,8 @@ protected void setupConfig()
7272
{
7373
for( int x = 0; x < 9; x++ )
7474
{
75-
if( y < 2 )
76-
{
77-
this.addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
78-
}
79-
else
80-
{
81-
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y - 2 ) );
82-
}
75+
// this.addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
76+
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y ) );
8377
}
8478
}
8579

@@ -121,9 +115,12 @@ public void detectAndSendChanges()
121115
@Override
122116
public boolean isSlotEnabled( final int idx )
123117
{
118+
if (this.getUpgradeable().getInstalledUpgrades(Upgrades.ORE_FILTER) > 0)
119+
return false;
120+
124121
final int upgrades = this.getUpgradeable().getInstalledUpgrades( Upgrades.CAPACITY );
125122

126-
return upgrades > idx;
123+
return upgrades > (idx-2);
127124
}
128125

129126
public void clear()

src/main/java/appeng/container/implementations/ContainerUpgradeable.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ protected void setupConfig()
127127
final IInventory inv = this.getUpgradeable().getInventoryByName( "config" );
128128
final int y = 40;
129129
final int x = 80;
130-
this.addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
131-
130+
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 0, x, y, 0, 0, 0 ) );
132131
if( this.supportCapacity() )
133132
{
134133
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 1, x, y, -1, 0, 1 ) );
@@ -248,6 +247,12 @@ protected void standardDetectAndSendChanges()
248247
@Override
249248
public boolean isSlotEnabled( final int idx )
250249
{
250+
if (this.getUpgradeable().getInstalledUpgrades( Upgrades.ORE_FILTER ) > 0)
251+
return false;
252+
253+
if (idx == 0)
254+
return true;
255+
251256
final int upgrades = this.getUpgradeable().getInstalledUpgrades( Upgrades.CAPACITY );
252257

253258
if( idx == 1 && upgrades > 0 )

src/main/java/appeng/core/Registration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ void postInit( final FMLPostInitializationEvent event )
629629
Upgrades.FUZZY.registerItem( parts.formationPlane(), 1 );
630630
Upgrades.INVERTER.registerItem( parts.formationPlane(), 1 );
631631
Upgrades.CAPACITY.registerItem( parts.formationPlane(), 5 );
632-
Upgrades.ORE_FILTER.registerItem( parts.formationPlane(), 1 );
632+
//Upgrades.ORE_FILTER.registerItem( parts.formationPlane(), 1 );
633633

634634
// Matter Cannon
635635
Upgrades.FUZZY.registerItem( items.massCannon(), 1 );

src/main/resources/assets/appliedenergistics2/lang/en_US.lang

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ gui.appliedenergistics2.Fuzzy=Fuzzy
234234
gui.appliedenergistics2.SmallFontCraft=Craft
235235
gui.appliedenergistics2.LargeFontCraft=+
236236
gui.appliedenergistics2.Renamer=Custom Name: (Enter to set)
237-
gui.appliedenergistics2.OreFilterLabel=Ore dictionary filter (may use regex)
237+
gui.appliedenergistics2.OreFilterLabel=Ore dictionary filter
238238
gui.appliedenergistics2.Nothing=Nothing
239239

240240
# GUI Tooltips
@@ -330,7 +330,7 @@ gui.tooltips.appliedenergistics2.SchedulingModeRandom=Export items in random mod
330330
gui.tooltips.appliedenergistics2.ItemsStored=Items Stored: %s
331331
gui.tooltips.appliedenergistics2.ItemsRequestable=Items Requestable: %s
332332
gui.tooltips.appliedenergistics2.P2PFrequency=Frequency: %s
333-
gui.tooltips.appliedenergistics2.OreFilterHint=Filter using oredictionary names
333+
gui.tooltips.appliedenergistics2.OreFilterHint=Filter items using ore dictionary names
334334
gui.tooltips.appliedenergistics2.OreFilter=Oredictioary filter
335335

336336
# Units
Loading

0 commit comments

Comments
 (0)