From 2fcb3c44201d574cf38a43c9daeb73e261eca58f Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 12 Jul 2018 21:13:08 -0400 Subject: [PATCH] Bugfixes --- .../mindustry/content/blocks/DistributionBlocks.java | 2 ++ .../mindustry/world/blocks/distribution/LiquidBridge.java | 3 +-- .../mindustry/world/blocks/distribution/OverflowGate.java | 2 +- .../mindustry/world/blocks/distribution/Splitter.java | 8 ++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java index f045133968..526563033e 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java @@ -29,10 +29,12 @@ public class DistributionBlocks extends BlockList implements ContentList{ bridgeConveyor = new BufferedItemBridge("bridge-conveyor"){{ range = 3; hasPower = false; + consumes.power(0.05f); }}; phaseConveyor = new ItemBridge("phase-conveyor"){{ range = 7; + consumes.power(0.05f); }}; sorter = new Sorter("sorter"); diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/LiquidBridge.java b/core/src/io/anuke/mindustry/world/blocks/distribution/LiquidBridge.java index 383a86cf03..55444ca2b0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/LiquidBridge.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/LiquidBridge.java @@ -24,7 +24,7 @@ public class LiquidBridge extends ItemBridge{ entity.time2 += (entity.cycleSpeed - 1f) * Timers.delta(); Tile other = world.tile(entity.link); - if(!linkValid(tile, other)){ + if(!linkValid(tile, other) ){ tryDumpLiquid(tile, entity.liquids.current()); }else{ if(entity.cons.valid()){ @@ -33,7 +33,6 @@ public class LiquidBridge extends ItemBridge{ entity.uptime = Mathf.lerpDelta(entity.uptime, 0f, 0.02f); } - if(entity.uptime >= 0.5f){ if(tryMoveLiquid(tile, other, false, entity.liquids.current()) > 0.1f){ diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/OverflowGate.java b/core/src/io/anuke/mindustry/world/blocks/distribution/OverflowGate.java index c7ebb6e75a..db4ecebd58 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/OverflowGate.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/OverflowGate.java @@ -17,7 +17,7 @@ public class OverflowGate extends Splitter{ if(dir == -1) return null; Tile to = dest.getNearby(dir); - if(!(to.block().acceptItem(item, to, dest) || + if((!to.block().acceptItem(item, to, dest) || (to.block().instantTransfer && source.block().instantTransfer))){ Tile a = dest.getNearby(Mathf.mod(dir - 1, 4)); Tile b = dest.getNearby(Mathf.mod(dir + 1, 4)); diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Splitter.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Splitter.java index 1edf61002d..f0d4d84022 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Splitter.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Splitter.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.world.blocks.distribution; import com.badlogic.gdx.utils.Array; import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.world.BarType; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Edges; import io.anuke.mindustry.world.Tile; @@ -19,6 +20,13 @@ public class Splitter extends Block{ group = BlockGroup.transportation; } + @Override + public void setBars(){ + super.setBars(); + + bars.remove(BarType.inventory); + } + @Override public boolean acceptItem(Item item, Tile tile, Tile source){ Tile to = getTileTarget(item, tile, source, false);