From 8e70568e3203a47a0015b32b1a97359733c16f5d Mon Sep 17 00:00:00 2001 From: Sonnicon <36009275+Sonnicon@users.noreply.github.com> Date: Thu, 1 Nov 2018 23:49:05 +0000 Subject: [PATCH] Made placement of pumps consistent across different placements. (#292) --- .../mindustry/world/blocks/production/Pump.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Pump.java b/core/src/io/anuke/mindustry/world/blocks/production/Pump.java index aaa483bb81..939587fa60 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Pump.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Pump.java @@ -64,15 +64,11 @@ public class Pump extends LiquidBlock{ if(isMultiblock()){ Liquid last = null; for(Tile other : tile.getLinkedTilesAs(this, drawTiles)){ - if(other == null) return false; - //can't place pump on block with multiple liquids - if(last != null && other.floor().liquidDrop != last){ + if(other.floor().liquidDrop == null) + continue; + if(other.floor().liquidDrop != last && last != null) return false; - } - - if(isValid(other)){ - last = other.floor().liquidDrop; - } + last = other.floor().liquidDrop; } return last != null; }else{