Added Interface Priority.

This commit is contained in:
AlgorithmX2
2014-07-17 22:38:57 -05:00
parent 502235dd42
commit 8ae01a4e38
7 changed files with 103 additions and 9 deletions
+16 -2
View File
@@ -40,6 +40,7 @@ import appeng.client.texture.CableBusTextures;
import appeng.core.sync.GuiBridge;
import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost;
import appeng.helpers.IPriorityHost;
import appeng.parts.PartBasicState;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
@@ -52,7 +53,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartInterface extends PartBasicState implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IInterfaceHost,
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost
{
DualityInterface duality = new DualityInterface( proxy, this );
@@ -60,13 +61,14 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
public PartInterface(ItemStack is) {
super( PartInterface.class, is );
}
@Override
public void addToWorld()
{
super.addToWorld();
duality.initalize();
}
@MENetworkEventSubscribe
public void stateChange(MENetworkChannelsChanged c)
{
@@ -390,4 +392,16 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
duality.jobStateChange( link );
}
@Override
public int getPriority()
{
return duality.getPriority();
}
@Override
public void setPriority(int newValue)
{
duality.setPriority( newValue );
}
}