From 4d6dc9546f6f248d5519b1494b73d95a8d05d761 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 20 Jul 2018 16:52:42 -0400 Subject: [PATCH] Fixed cliffs not blending properly --- .../anuke/mindustry/world/blocks/Floor.java | 2 +- .../world/blocks/production/Drill.java | 36 +++++-------------- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/blocks/Floor.java b/core/src/io/anuke/mindustry/world/blocks/Floor.java index 579b37b1d5..1717cf5de9 100644 --- a/core/src/io/anuke/mindustry/world/blocks/Floor.java +++ b/core/src/io/anuke/mindustry/world/blocks/Floor.java @@ -178,7 +178,7 @@ public class Floor extends Block{ Floor floor = other.floor(); - if(floor.id <= this.id || !blends.test(floor) || (floor.cacheLayer.ordinal() > this.cacheLayer.ordinal() && !sameLayer) || + if((floor.id <= this.id && !(other.getElevation() > tile.getElevation())) || !blends.test(floor) || (floor.cacheLayer.ordinal() > this.cacheLayer.ordinal() && !sameLayer) || (sameLayer && floor.cacheLayer == this.cacheLayer)) continue; TextureRegion region = floor.edgeRegions[i]; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index 5d7951a5a4..d4a1d33368 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -31,42 +31,24 @@ public class Drill extends Block{ protected final Array drawTiles = new Array<>(); protected final Array toAdd = new Array<>(); - /** - * Maximum tier of blocks this drill can mine. - */ + /**Maximum tier of blocks this drill can mine.*/ protected int tier; - /** - * Base time to drill one ore, in frames. - */ + /**Base time to drill one ore, in frames.*/ protected float drillTime = 300; - /** - * Whether the liquid is required to drill. If false, then it will be used as a speed booster. - */ + /**Whether the liquid is required to drill. If false, then it will be used as a speed booster.*/ protected boolean liquidRequired = false; - /** - * How many times faster the drill will progress when boosted by liquid. - */ + /**How many times faster the drill will progress when boosted by liquid.*/ protected float liquidBoostIntensity = 1.6f; - /** - * Speed at which the drill speeds up. - */ + /**Speed at which the drill speeds up.*/ protected float warmupSpeed = 0.02f; - /** - * Effect played when an item is produced. This is colored. - */ + /**Effect played when an item is produced. This is colored.*/ protected Effect drillEffect = BlockFx.mine; - /** - * Speed the drill bit rotates at. - */ + /**Speed the drill bit rotates at.*/ protected float rotateSpeed = 2f; - /** - * Effect randomly played while drilling. - */ + /**Effect randomly played while drilling.*/ protected Effect updateEffect = BlockFx.pulverizeSmall; - /** - * Chance the update effect will appear. - */ + /**Chance the update effect will appear.*/ protected float updateEffectChance = 0.02f; protected boolean drawRim = false;