Changed Grid Flags
This commit is contained in:
parent
253221e494
commit
d9a747d26b
|
@ -141,7 +141,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||
public void updateState()
|
||||
{
|
||||
EnumSet<GridFlags> set = gridProxy.getFlags();
|
||||
maxChannels = set.contains( GridFlags.CANNOT_CARRY ) ? 0 : (set.contains( GridFlags.TIER_2_CAPACITY ) ? 32 : 8);
|
||||
maxChannels = set.contains( GridFlags.CANNOT_CARRY ) ? 0 : (set.contains( GridFlags.DENSE_CAPACITY ) ? 32 : 8);
|
||||
myColor = gridProxy.getGridColor();
|
||||
validDirections = gridProxy.getConnectableSides();
|
||||
FindConnections();
|
||||
|
|
6
me/cache/PathGridCache.java
vendored
6
me/cache/PathGridCache.java
vendored
|
@ -170,7 +170,7 @@ public class PathGridCache implements IPathingGrid
|
|||
IGridBlock gb = nodes.getGridBlock();
|
||||
EnumSet<GridFlags> flags = gb.getFlags();
|
||||
|
||||
if ( flags.contains( GridFlags.DENSE_CHANNEL ) && !blockDense.isEmpty() )
|
||||
if ( flags.contains( GridFlags.COMPRESSED_CHANNEL ) && !blockDense.isEmpty() )
|
||||
return 9;
|
||||
|
||||
depth++;
|
||||
|
@ -212,7 +212,7 @@ public class PathGridCache implements IPathingGrid
|
|||
if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
requireChannels.remove( gridNode );
|
||||
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_DENSE ) )
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_COMPRESSED ) )
|
||||
blockDense.remove( gridNode );
|
||||
|
||||
repath();
|
||||
|
@ -232,7 +232,7 @@ public class PathGridCache implements IPathingGrid
|
|||
if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
requireChannels.add( gridNode );
|
||||
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_DENSE ) )
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_COMPRESSED ) )
|
||||
blockDense.add( gridNode );
|
||||
|
||||
repath();
|
||||
|
|
|
@ -59,7 +59,7 @@ public class PathSegment
|
|||
{
|
||||
boolean worked = false;
|
||||
|
||||
if ( flags.contains( GridFlags.DENSE_CHANNEL ) )
|
||||
if ( flags.contains( GridFlags.COMPRESSED_CHANNEL ) )
|
||||
worked = useDenseChannel( pi );
|
||||
else
|
||||
worked = useChannel( pi );
|
||||
|
@ -118,7 +118,7 @@ public class PathSegment
|
|||
IPathItem pi = start;
|
||||
while (pi != null)
|
||||
{
|
||||
if ( !pi.canSupportMoreChannels() || pi.getFlags().contains( GridFlags.CANNOT_CARRY_DENSE ) )
|
||||
if ( !pi.canSupportMoreChannels() || pi.getFlags().contains( GridFlags.CANNOT_CARRY_COMPRESSED ) )
|
||||
return false;
|
||||
|
||||
pi = pi.getControllerRoute();
|
||||
|
|
|
@ -259,7 +259,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
|||
IReadOnlyCollection<IGridConnection> set = part.getGridNode().getConnections();
|
||||
for (IGridConnection gc : set)
|
||||
{
|
||||
if ( proxy.getNode().hasFlag( GridFlags.TIER_2_CAPACITY ) && gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.TIER_2_CAPACITY ) )
|
||||
if ( proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY ) && gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY ) )
|
||||
sideOut |= (gc.getUsedChannels() / 4) << (4 * thisSide.ordinal());
|
||||
else
|
||||
sideOut |= (gc.getUsedChannels()) << (4 * thisSide.ordinal());
|
||||
|
@ -273,8 +273,8 @@ public class PartCable extends AEBasePart implements IPartCable
|
|||
ForgeDirection side = gc.getDirection( n );
|
||||
if ( side != ForgeDirection.UNKNOWN )
|
||||
{
|
||||
boolean isTier2a = proxy.getNode().hasFlag( GridFlags.TIER_2_CAPACITY );
|
||||
boolean isTier2b = gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.TIER_2_CAPACITY );
|
||||
boolean isTier2a = proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY );
|
||||
boolean isTier2b = gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY );
|
||||
|
||||
if ( isTier2a && isTier2b )
|
||||
sideOut |= (gc.getUsedChannels() / 4) << (4 * side.ordinal());
|
||||
|
|
|
@ -56,7 +56,7 @@ public class PartDenseCable extends PartCable
|
|||
|
||||
public PartDenseCable(Class c, ItemStack is) {
|
||||
super( c, is );
|
||||
proxy.setFlags( GridFlags.TIER_2_CAPACITY, GridFlags.PREFERED );
|
||||
proxy.setFlags( GridFlags.DENSE_CAPACITY, GridFlags.PREFERED );
|
||||
}
|
||||
|
||||
public PartDenseCable(ItemStack is) {
|
||||
|
|
|
@ -40,8 +40,8 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
|
|||
|
||||
public PartP2PTunnelME(ItemStack is) {
|
||||
super( is );
|
||||
proxy.setFlags( GridFlags.REQUIRE_CHANNEL, GridFlags.DENSE_CHANNEL );
|
||||
outerProxy.setFlags( GridFlags.TIER_2_CAPACITY, GridFlags.CANNOT_CARRY_DENSE );
|
||||
proxy.setFlags( GridFlags.REQUIRE_CHANNEL, GridFlags.COMPRESSED_CHANNEL );
|
||||
outerProxy.setFlags( GridFlags.DENSE_CAPACITY, GridFlags.CANNOT_CARRY_COMPRESSED );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,7 @@ public class TileController extends AENetworkPowerTile implements IAEPowerStorag
|
|||
internalMaxPower = 8000;
|
||||
internalPublicPowerStorage = true;
|
||||
gridProxy.setIdlePowerUsage( 6 );
|
||||
gridProxy.setFlags( GridFlags.CANNOT_CARRY, GridFlags.TIER_2_CAPACITY );
|
||||
gridProxy.setFlags( GridFlags.CANNOT_CARRY, GridFlags.DENSE_CAPACITY );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -56,7 +56,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
|||
public QBridgeHandler() {
|
||||
super( TileEventType.NETWORK, TileEventType.TICK );
|
||||
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
gridProxy.setFlags( GridFlags.TIER_2_CAPACITY );
|
||||
gridProxy.setFlags( GridFlags.DENSE_CAPACITY );
|
||||
gridProxy.setIdlePowerUsage( 22 );
|
||||
inv.setMaxStackSize( 1 );
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
|||
|
||||
public TileQuantumBridge() {
|
||||
addNewHandler( new QBridgeHandler() );
|
||||
gridProxy.setFlags( GridFlags.TIER_2_CAPACITY );
|
||||
gridProxy.setFlags( GridFlags.DENSE_CAPACITY );
|
||||
}
|
||||
|
||||
public IInventory getInternalInventory()
|
||||
|
|
Loading…
Reference in a new issue