Prioritize powered networks, fixes a glitch with tunnels connecting.
This commit is contained in:
@@ -28,6 +28,7 @@ public class Grid implements IGrid
|
||||
HashMap<Class<? extends IGridCache>, GridCacheWrapper> caches = new HashMap<Class<? extends IGridCache>, GridCacheWrapper>();
|
||||
|
||||
GridNode pivot;
|
||||
int isImportant; // how import is this network?
|
||||
|
||||
public Grid(GridNode center) {
|
||||
this.pivot = center;
|
||||
@@ -228,4 +229,10 @@ public class Grid implements IGrid
|
||||
}
|
||||
}
|
||||
|
||||
public void setImportantFlag(int i, boolean publicHasPower)
|
||||
{
|
||||
int flag = 1 << i;
|
||||
isImportant = (isImportant & ~flag) | (publicHasPower ? flag : 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user