Ad-Hoc Networks can no longer tunnel; Tunnels.
This commit is contained in:
parent
6ce5a8f4c5
commit
70ef70a42e
1 changed files with 21 additions and 4 deletions
25
me/cache/PathGridCache.java
vendored
25
me/cache/PathGridCache.java
vendored
|
@ -1,5 +1,6 @@
|
|||
package appeng.me.cache;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
|
@ -47,6 +48,7 @@ public class PathGridCache implements IPathingGrid
|
|||
int ticksUntilReady = 20;
|
||||
Set<TileController> controllers = new HashSet();
|
||||
Set<IGridNode> requireChannels = new HashSet();
|
||||
Set<IGridNode> blockDense = new HashSet();
|
||||
|
||||
final IGrid myGrid;
|
||||
private HashSet<IPathItem> semiOpen = new HashSet();
|
||||
|
@ -165,10 +167,15 @@ public class PathGridCache implements IPathingGrid
|
|||
{
|
||||
if ( !semiOpen.contains( nodes ) )
|
||||
{
|
||||
IGridBlock gb = nodes.getGridBlock();
|
||||
EnumSet<GridFlags> flags = gb.getFlags();
|
||||
|
||||
if ( flags.contains( GridFlags.DENSE_CHANNEL ) && !blockDense.isEmpty() )
|
||||
return 9;
|
||||
|
||||
depth++;
|
||||
|
||||
IGridBlock gb = nodes.getGridBlock();
|
||||
if ( gb.getFlags().contains( GridFlags.MULTIBLOCK ) )
|
||||
if ( flags.contains( GridFlags.MULTIBLOCK ) )
|
||||
{
|
||||
IGridMultiblock gmb = (IGridMultiblock) gb;
|
||||
Iterator<IGridNode> i = gmb.getMultiblockNodes();
|
||||
|
@ -200,9 +207,14 @@ public class PathGridCache implements IPathingGrid
|
|||
recalculateControllerNextTick = true;
|
||||
}
|
||||
|
||||
if ( gridNode.getGridBlock().getFlags().contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
EnumSet<GridFlags> flags = gridNode.getGridBlock().getFlags();
|
||||
|
||||
if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
requireChannels.remove( gridNode );
|
||||
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_DENSE ) )
|
||||
blockDense.remove( gridNode );
|
||||
|
||||
repath();
|
||||
}
|
||||
|
||||
|
@ -215,9 +227,14 @@ public class PathGridCache implements IPathingGrid
|
|||
recalculateControllerNextTick = true;
|
||||
}
|
||||
|
||||
if ( gridNode.getGridBlock().getFlags().contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
EnumSet<GridFlags> flags = gridNode.getGridBlock().getFlags();
|
||||
|
||||
if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
requireChannels.add( gridNode );
|
||||
|
||||
if ( flags.contains( GridFlags.CANNOT_CARRY_DENSE ) )
|
||||
blockDense.add( gridNode );
|
||||
|
||||
repath();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue