From 263f129c8becad8275a8c35090c2346bcb60d597 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 May 2022 23:28:37 -0400 Subject: [PATCH] Fixed #6843 --- .../world/blocks/distribution/DirectionLiquidBridge.java | 4 ++++ core/src/mindustry/world/blocks/distribution/Duct.java | 4 ++-- core/src/mindustry/world/blocks/production/HeatCrafter.java | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/world/blocks/distribution/DirectionLiquidBridge.java b/core/src/mindustry/world/blocks/distribution/DirectionLiquidBridge.java index d55f77ed45..d5c53f4d6d 100644 --- a/core/src/mindustry/world/blocks/distribution/DirectionLiquidBridge.java +++ b/core/src/mindustry/world/blocks/distribution/DirectionLiquidBridge.java @@ -76,6 +76,10 @@ public class DirectionLiquidBridge extends DirectionBridge{ @Override public boolean acceptLiquid(Building source, Liquid liquid){ + var link = findLink(); + //only accept if there's an output point, or it comes from a link + if(link == null && !(source instanceof DirectionBridgeBuild b && b.findLink() == this)) return false; + int rel = this.relativeToEdge(source.tile); return diff --git a/core/src/mindustry/world/blocks/distribution/Duct.java b/core/src/mindustry/world/blocks/distribution/Duct.java index 4634bda455..cdf6e68f70 100644 --- a/core/src/mindustry/world/blocks/distribution/Duct.java +++ b/core/src/mindustry/world/blocks/distribution/Duct.java @@ -75,7 +75,7 @@ public class Duct extends Block implements Autotiler{ || ((!otherblock.rotatedOutput(otherx, othery) && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null && Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) || //basically the only change here is that it treats overflow ducts specially, since they're... weird - ((otherblock.rotatedOutput(otherx, othery) || otherblock instanceof OverflowDuct) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); + ((otherblock.rotatedOutput(otherx, othery)) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); } @Override @@ -175,7 +175,7 @@ public class Duct extends Block implements Autotiler{ return current == null && items.total() == 0 && (armored ? //armored acceptance - ((source.block.rotate && source.front() == this && source.block.hasItems) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) : + ((source.block.rotate && source.front() == this && source.block.hasItems && (source.block instanceof Duct)) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) : //standard acceptance - do not accept from front !(source.block.rotate && next == source) && Math.abs(Edges.getFacingEdge(source.tile, tile).relativeTo(tile.x, tile.y) - rotation) != 2 ); diff --git a/core/src/mindustry/world/blocks/production/HeatCrafter.java b/core/src/mindustry/world/blocks/production/HeatCrafter.java index 5eba378804..7ab6317608 100644 --- a/core/src/mindustry/world/blocks/production/HeatCrafter.java +++ b/core/src/mindustry/world/blocks/production/HeatCrafter.java @@ -67,8 +67,9 @@ public class HeatCrafter extends GenericCrafter{ } @Override - public float getProgressIncrease(float base){ - return super.getProgressIncrease(base) * efficiencyScale(); + public void updateEfficiencyMultiplier(){ + efficiency *= efficiencyScale(); + potentialEfficiency *= efficiencyScale(); } public float efficiencyScale(){