Skip to content

Commit

Permalink
remove int comparator (causes error on android)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pointifix committed Nov 3, 2022
1 parent 2d41141 commit 4ed3fe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/autodrill/filler/WallDrill.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void fill(Tile tile, BeamDrill drill, Direction direction) {
}
if (ductTiles.isEmpty()) return;

Tile outerMostDuctTile = ductTiles.copy().filter(t -> boreTiles.find(bt -> direction.secondaryAxis(new Point2(bt.x, bt.y)) == direction.secondaryAxis(new Point2(t.x, t.y))) == null).max(Comparator.comparingInt(t -> -direction.primaryAxis(new Point2(t.x, t.y))));
Tile outerMostDuctTile = ductTiles.copy().filter(t -> boreTiles.find(bt -> direction.secondaryAxis(new Point2(bt.x, bt.y)) == direction.secondaryAxis(new Point2(t.x, t.y))) == null).max(t -> -direction.primaryAxis(new Point2(t.x, t.y)));
if (outerMostDuctTile == null) return;
ductTiles.sort(t -> t.dst2(outerMostDuctTile));
Seq<Tile> connectingTiles = new Seq<>();
Expand Down Expand Up @@ -143,7 +143,7 @@ public static void fill(Tile tile, BeamDrill drill, Direction direction) {
Vars.player.unit().addBuild(buildPlan);
}

Tile outerMost = boreTiles.max(Comparator.comparingInt(t -> -direction.primaryAxis(new Point2(t.x, t.y))));
Tile outerMost = boreTiles.max(t -> -direction.primaryAxis(new Point2(t.x, t.y)));
for (Tile boreTile : boreTiles) {
Tile beamNodeTile = Vars.world.tile(
Math.abs(direction.p.x) * outerMost.x + Math.abs(direction.p.y) * boreTile.x - offsetOpposite.x + directionOpposite.p.x * 2,
Expand Down

0 comments on commit 4ed3fe7

Please sign in to comment.