Fixed blocks linking through insulated walls
This commit is contained in:
@@ -37,7 +37,6 @@ public class LParser{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void error(String message){
|
void error(String message){
|
||||||
//TODO
|
|
||||||
throw new RuntimeException("Invalid code. " + message);
|
throw new RuntimeException("Invalid code. " + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
other.power.links.size < node.maxNodes &&
|
other.power.links.size < node.maxNodes &&
|
||||||
node.overlaps(other.x, other.y, tile, block, node.laserRange * tilesize) && other.team == team
|
node.overlaps(other.x, other.y, tile, block, node.laserRange * tilesize) && other.team == team
|
||||||
&& !graphs.contains(other.power.graph) &&
|
&& !graphs.contains(other.power.graph) &&
|
||||||
|
!PowerNode.insulated(tile, other.tile) &&
|
||||||
!Structs.contains(Edges.getEdges(block.size), p -> { //do not link to adjacent buildings
|
!Structs.contains(Edges.getEdges(block.size), p -> { //do not link to adjacent buildings
|
||||||
var t = world.tile(tile.x + p.x, tile.y + p.y);
|
var t = world.tile(tile.x + p.x, tile.y + p.y);
|
||||||
return t != null && t.build == other;
|
return t != null && t.build == other;
|
||||||
|
|||||||
Reference in New Issue
Block a user