From 18a382b07abd9817863e2ec893b1715cb6bf72ba Mon Sep 17 00:00:00 2001 From: genNAowl <68400583+genNAowl@users.noreply.github.com> Date: Mon, 18 Jan 2021 14:34:17 -0800 Subject: [PATCH 1/3] Draw Conveyor Items under Blocks (#4372) * Draw Conveyor Items under Blocks * Remove new layer in favor of subtraction Co-authored-by: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com> --- core/src/mindustry/world/blocks/distribution/Conveyor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index 7fb01d9be0..4e59952084 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -127,11 +127,11 @@ public class Conveyor extends Block implements Autotiler{ } } - Draw.z(Layer.block); + Draw.z(Layer.block - 0.2f); Draw.rect(regions[blendbits][frame], x, y, tilesize * blendsclx, tilesize * blendscly, rotation * 90); - Draw.z(Layer.blockOver); + Draw.z(Layer.block - 0.1f); for(int i = 0; i < len; i++){ Item item = ids[i]; From 2da128678a4eaf40e79e21f48c4e0780c5a08af2 Mon Sep 17 00:00:00 2001 From: Joshua Fan Date: Mon, 18 Jan 2021 14:44:01 -0800 Subject: [PATCH 2/3] Always allow zoom while controlling unit that can't build (#4371) --- core/src/mindustry/input/DesktopInput.java | 2 +- core/src/mindustry/input/MobileInput.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 5c82bd67a3..06e980f7d3 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -251,7 +251,7 @@ public class DesktopInput extends InputHandler{ //zoom camera if((!Core.scene.hasScroll() || Core.input.keyDown(Binding.diagonal_placement)) && !ui.chatfrag.shown() && Math.abs(Core.input.axisTap(Binding.zoom)) > 0 - && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ + && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); } diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index fb9fdbf86b..2ad24c1e9a 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -652,7 +652,7 @@ public class MobileInput extends InputHandler implements GestureListener{ } //zoom camera - if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ + if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); } From f91910e84f7adb8c4866140ed7001af136ccf678 Mon Sep 17 00:00:00 2001 From: Sunny Kim <58885089+sk7725@users.noreply.github.com> Date: Tue, 19 Jan 2021 07:45:45 +0900 Subject: [PATCH 3/3] conductsTo() returning whether to conduct itself to adjacent builds (#4354) * conductsTo * insulated block no longer conducts * moved both checks to be symmetrical --- core/src/mindustry/entities/comp/BuildingComp.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 1fa2d7c372..f4758c427d 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -778,6 +778,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, } power.links.clear(); } + + public boolean conductsTo(Building other){ + return !block.insulated; + } public Seq getPowerConnections(Seq out){ out.clear(); @@ -786,7 +790,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, for(Building other : proximity){ if(other != null && other.power != null && !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower) - && !power.links.contains(other.pos())){ + && conductsTo(other) && other.conductsTo(self()) && !power.links.contains(other.pos())){ out.add(other); } }