From 4b6a83dd82cce8023fb7f66ac65f3f545a52f3cf Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 24 Feb 2021 15:01:44 -0500 Subject: [PATCH] Improved auto-bridging with conveyors --- core/src/mindustry/input/Placement.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/input/Placement.java b/core/src/mindustry/input/Placement.java index 8c0586857e..a60853e8e5 100644 --- a/core/src/mindustry/input/Placement.java +++ b/core/src/mindustry/input/Placement.java @@ -114,6 +114,9 @@ public class Placement{ return; } + Boolf placeable = plan -> (plan.placeable(player.team())) || + (plan.tile() != null && plan.tile().block() == plan.block); //don't count the same block as inaccessible + var result = plans1.clear(); var team = player.team(); @@ -123,7 +126,7 @@ public class Placement{ result.add(cur); //gap found - if(i < plans.size - 1 && cur.placeable(team) && !plans.get(i + 1).placeable(team)){ + if(i < plans.size - 1 && placeable.get(cur) && !placeable.get(plans.get(i + 1))){ //find the closest valid position within range for(int j = i + 1; j < plans.size; j++){