From fbed11e927be81197d5ec8b676cd6ccaba5750fc Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Dec 2019 15:13:45 -0500 Subject: [PATCH] Fixed #1198 --- .../io/anuke/mindustry/entities/type/base/BuilderDrone.java | 5 +++++ core/src/io/anuke/mindustry/graphics/BlockRenderer.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java b/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java index ca31f4c401..fdaaa049dd 100644 --- a/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java +++ b/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java @@ -24,6 +24,7 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ private static final IntIntMap totals = new IntIntMap(); protected Queue placeQueue = new Queue<>(); + protected BuildRequest lastFound; protected boolean isBreaking; protected Player playerTarget; @@ -57,6 +58,9 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ buildQueue().addLast(new BuildRequest(entity.tile.x, entity.tile.y)); }else{ buildQueue().addLast(new BuildRequest(entity.tile.x, entity.tile.y, entity.tile.rotation(), entity.cblock)); + if(lastFound != null && lastFound.hasConfig){ + buildQueue().last().configure(lastFound.config); + } } } @@ -174,6 +178,7 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ BuildEntity b = tile.ent(); float dist = Math.min(b.dst(x, y) - placeDistance, 0); if(dist / type.maxVelocity < b.buildCost * 0.9f){ + lastFound = req; target = b; this.isBreaking = req.breaking; setState(build); diff --git a/core/src/io/anuke/mindustry/graphics/BlockRenderer.java b/core/src/io/anuke/mindustry/graphics/BlockRenderer.java index 1e7fa36982..8912745633 100644 --- a/core/src/io/anuke/mindustry/graphics/BlockRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/BlockRenderer.java @@ -138,7 +138,7 @@ public class BlockRenderer implements Disposable{ Block b = content.block(block.block); if(!camera.bounds(Tmp.r1).grow(tilesize * 2f).overlaps(Tmp.r2.setSize(b.size * tilesize).setCenter(block.x * tilesize + b.offset(), block.y * tilesize + b.offset()))) continue; - Draw.alpha(0.53f * brokenFade); + Draw.alpha(0.33f * brokenFade); Draw.mixcol(Color.white, 0.2f + Mathf.absin(Time.globalTime(), 6f, 0.2f)); Draw.rect(b.icon(Cicon.full), block.x * tilesize + b.offset(), block.y * tilesize + b.offset(), b.rotate ? block.rotation * 90 : 0f); }