Resolved #0202 - The question of cable power usage.

Cables no longer use power.
Each channel on a block now consumes 1 / 128 AE/t
This commit is contained in:
AlgorithmX2
2014-03-17 22:58:58 -05:00
parent b226b5bb49
commit a475a3e91f
6 changed files with 51 additions and 19 deletions
+8 -1
View File
@@ -52,6 +52,9 @@ public class PathGridCache implements IPathingGrid
private HashSet<IPathItem> semiOpen = new HashSet();
private HashSet<IPathItem> closedList = new HashSet();
public int channelsByBlocks = 0;
public double channelPowerUsage = 0.0;
public PathGridCache(IGrid g) {
myGrid = g;
}
@@ -82,6 +85,8 @@ public class PathGridCache implements IPathingGrid
int nodes = myGrid.getNodes().size();
ticksUntilReady = 20 + (nodes / 10);
channelsByBlocks = nodes * used;
channelPowerUsage = (double) channelsByBlocks / 128.0;
myGrid.getPivot().beginVisition( new AdHocChannelUpdater( used ) );
}
@@ -111,7 +116,7 @@ public class PathGridCache implements IPathingGrid
closedList.add( gc );
open.add( gc );
gc.setControllerRoute( (GridNode) node, true );
active.add( new PathSegment( open, semiOpen, closedList ) );
active.add( new PathSegment( this, open, semiOpen, closedList ) );
}
}
}
@@ -145,6 +150,7 @@ public class PathGridCache implements IPathingGrid
}
booting = false;
channelPowerUsage = (double) channelsByBlocks / 128.0;
myGrid.postEvent( new MENetworkBootingStatusChange() );
}
}
@@ -181,6 +187,7 @@ public class PathGridCache implements IPathingGrid
// clean up...
active.clear();
channelsByBlocks = 0;
updateNetwork = true;
}