All Terminals now can be opened in low power / channel state and show dark slots.

This commit is contained in:
AlgorithmX2
2014-03-27 23:31:06 -05:00
parent 5e36754cfd
commit c40c81070c
18 changed files with 204 additions and 38 deletions
+1 -1
View File
@@ -526,7 +526,7 @@ public abstract class AEBaseGui extends GuiContainer
AppEngRenderItem aeri = new AppEngRenderItem();
private boolean isPowered()
protected boolean isPowered()
{
return true;
}
@@ -79,6 +79,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
super( c );
myScrollBar = new GuiScrollbar();
repo = new ItemRepo( myScrollBar, this );
xSize = 195;
ySize = 204;
@@ -156,7 +157,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.xSize = standardSize + ((perRow - 9) * 18);
else
this.xSize = standardSize;
super.initGui();
// full size : 204
// extra slots : 72
@@ -280,6 +281,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
}
}
@Override
public void updateScreen()
{
repo.setPower( mecontainer.hasPower );
super.updateScreen();
}
@Override
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
{
@@ -354,4 +362,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
repo.updateView();
}
protected boolean isPowered()
{
return repo.hasPower();
}
}
+5
View File
@@ -28,4 +28,9 @@ public class InternalSlotME
{
return repo.getRefrenceItem( offset );
}
public boolean hasPower()
{
return repo.hasPower();
}
}
+12
View File
@@ -241,4 +241,16 @@ public class ItemRepo
list.resetStatus();
}
private boolean hasPower;
public boolean hasPower()
{
return hasPower;
}
public void setPower(boolean hasPower)
{
this.hasPower = hasPower;
}
}
+9 -3
View File
@@ -19,12 +19,16 @@ public class SlotME extends Slot
@Override
public ItemStack getStack()
{
return mySlot.getStack();
if ( mySlot.hasPower() )
return mySlot.getStack();
return null;
}
public IAEItemStack getAEStack()
{
return mySlot.getAEStack();
if ( mySlot.hasPower() )
return mySlot.getAEStack();
return null;
}
@Override
@@ -48,7 +52,9 @@ public class SlotME extends Slot
@Override
public boolean getHasStack()
{
return getStack() != null;
if ( mySlot.hasPower() )
return getStack() != null;
return false;
}
@Override