Misc bugfixes
This commit is contained in:
@@ -405,17 +405,16 @@ public class PowerNode extends PowerBlock{
|
||||
}
|
||||
|
||||
if(this == other){ //double tapped
|
||||
if(other.power.links.size == 0 || Core.input.shift()){ //find links
|
||||
int[] total = {0};
|
||||
if(other.power.links.size == 0){ //find links
|
||||
Seq<Point2> points = new Seq<>();
|
||||
getPotentialLinks(tile, team, link -> {
|
||||
if(!insulated(this, link) && total[0]++ < maxNodes){
|
||||
configure(link.pos());
|
||||
if(!insulated(this, link) && points.size < maxNodes){
|
||||
points.add(new Point2(link.tileX() - tile.x, link.tileY() - tile.y));
|
||||
}
|
||||
});
|
||||
configure(points.toArray(Point2.class));
|
||||
}else{ //clear links
|
||||
while(power.links.size > 0){
|
||||
configure(power.links.get(0));
|
||||
}
|
||||
configure(new Point2[0]);
|
||||
}
|
||||
deselect();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user