Minor bridge linking fix
This commit is contained in:
@@ -859,6 +859,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
req.animScale = 1f;
|
||||
lineRequests.add(req);
|
||||
});
|
||||
block.handlePlacementLine(lineRequests);
|
||||
|
||||
if(Core.settings.getBool("blockreplace")){
|
||||
lineRequests.each(req -> {
|
||||
|
||||
@@ -12,16 +12,16 @@ import mindustry.world.blocks.distribution.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Placement{
|
||||
private final static Seq<Point2> tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>();
|
||||
private static final Seq<Point2> tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>();
|
||||
private static final NormalizeResult result = new NormalizeResult();
|
||||
private static final NormalizeDrawResult drawResult = new NormalizeDrawResult();
|
||||
private static Bresenham2 bres = new Bresenham2();
|
||||
private static Seq<Point2> points = new Seq<>();
|
||||
private static final Bresenham2 bres = new Bresenham2();
|
||||
private static final Seq<Point2> points = new Seq<>();
|
||||
|
||||
//for pathfinding
|
||||
private static IntFloatMap costs = new IntFloatMap();
|
||||
private static IntIntMap parents = new IntIntMap();
|
||||
private static IntSet closed = new IntSet();
|
||||
private static final IntFloatMap costs = new IntFloatMap();
|
||||
private static final IntIntMap parents = new IntIntMap();
|
||||
private static final IntSet closed = new IntSet();
|
||||
|
||||
/** Normalize a diagonal line into points. */
|
||||
public static Seq<Point2> pathfindLine(boolean conveyors, int startX, int startY, int endX, int endY){
|
||||
|
||||
@@ -403,6 +403,11 @@ public class Block extends UnlockableContent{
|
||||
|
||||
}
|
||||
|
||||
/** Mutates the given list of requests used during line placement. */
|
||||
public void handlePlacementLine(Seq<BuildPlan> plans){
|
||||
|
||||
}
|
||||
|
||||
public Object nextConfig(){
|
||||
if(saveConfig && lastConfig != null){
|
||||
return lastConfig;
|
||||
|
||||
@@ -176,11 +176,11 @@ public class ItemBridge extends Block{
|
||||
public void playerPlaced(Object config){
|
||||
super.playerPlaced(config);
|
||||
|
||||
if(config != null) return;
|
||||
|
||||
Tile link = findLink(tile.x, tile.y);
|
||||
if(linkValid(tile, link) && !proximity.contains(link.build)){
|
||||
link.build.configure(tile.pos());
|
||||
if(config == null){
|
||||
Tile link = findLink(tile.x, tile.y);
|
||||
if(linkValid(tile, link) && !proximity.contains(link.build)){
|
||||
link.build.configure(tile.pos());
|
||||
}
|
||||
}
|
||||
|
||||
lastBuild = this;
|
||||
|
||||
Reference in New Issue
Block a user