From 1476c4dacd927baf3992555e54d4d71aa7155d73 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 21 Jul 2022 07:56:09 -0400 Subject: [PATCH] Fixed #7213 --- core/assets-raw/sprites/editor/pack.json | 4 ++-- core/assets-raw/sprites/ui/pack.json | 4 ++-- core/src/mindustry/entities/comp/BuilderComp.java | 3 ++- .../world/blocks/distribution/ArmoredConveyor.java | 9 +++++++++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/core/assets-raw/sprites/editor/pack.json b/core/assets-raw/sprites/editor/pack.json index 252a508081..775c36ebdd 100644 --- a/core/assets-raw/sprites/editor/pack.json +++ b/core/assets-raw/sprites/editor/pack.json @@ -2,8 +2,8 @@ duplicatePadding: true, combineSubdirectories: true, flattenPaths: true, - maxWidth: 4096, - maxHeight: 4096, + maxWidth: 2048, + maxHeight: 2048, fast: true, stripWhitespaceCenter: true } diff --git a/core/assets-raw/sprites/ui/pack.json b/core/assets-raw/sprites/ui/pack.json index 252a508081..775c36ebdd 100644 --- a/core/assets-raw/sprites/ui/pack.json +++ b/core/assets-raw/sprites/ui/pack.json @@ -2,8 +2,8 @@ duplicatePadding: true, combineSubdirectories: true, flattenPaths: true, - maxWidth: 4096, - maxHeight: 4096, + maxWidth: 2048, + maxHeight: 2048, fast: true, stripWhitespaceCenter: true } diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index b6536ce704..378776585a 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -258,7 +258,8 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ boolean activelyBuilding(){ //not actively building when not near the build plan if(isBuilding()){ - if(!state.isEditor() && !within(buildPlan(), state.rules.infiniteResources ? Float.MAX_VALUE : type.buildRange)){ + var plan = buildPlan(); + if(!state.isEditor() && plan != null && !within(plan, state.rules.infiniteResources ? Float.MAX_VALUE : type.buildRange)){ return false; } } diff --git a/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java b/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java index e5e2c05545..4788b6662e 100644 --- a/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/ArmoredConveyor.java @@ -1,5 +1,6 @@ package mindustry.world.blocks.distribution; +import arc.math.geom.*; import mindustry.gen.*; import mindustry.type.*; import mindustry.world.*; @@ -17,6 +18,14 @@ public class ArmoredConveyor extends Conveyor{ (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems); } + @Override + public boolean blendsArmored(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ + return Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery) + || ((!otherblock.rotatedOutput(otherx, othery) && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null && + Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) || + (otherblock instanceof Conveyor && otherblock.rotatedOutput(otherx, othery) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); + } + public class ArmoredConveyorBuild extends ConveyorBuild{ @Override public boolean acceptItem(Building source, Item item){