From 9d67c36c3248f9cfe03d0368d21d63a111613327 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 19 Apr 2019 23:07:21 -0400 Subject: [PATCH] Cleanup, bugfixes --- core/src/io/anuke/mindustry/content/Blocks.java | 8 ++------ core/src/io/anuke/mindustry/content/TechTree.java | 3 +-- core/src/io/anuke/mindustry/graphics/Pixelator.java | 5 +++++ core/src/io/anuke/mindustry/world/BlockStorage.java | 6 ++---- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 1718d16a97..4cca67df16 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -112,10 +112,7 @@ public class Blocks implements ContentList{ part = new BlockPart(); - spawn = new Block("spawn"){ - public void drawShadow(Tile tile){ - } - }; + spawn = new Block("spawn"); //Registers build blocks from size 1-6 //no reference is needed here since they can be looked up by name later @@ -378,8 +375,7 @@ public class Blocks implements ContentList{ darkPanel5 = new Floor("dark-panel-5"){{ variants = 0; }}; darkPanel6 = new Floor("dark-panel-6"){{ variants = 0; }}; - darkMetal = new StaticWall("dark-metal"){{ - }}; + darkMetal = new StaticWall("dark-metal"); pebbles = new OverlayFloor("pebbles"); diff --git a/core/src/io/anuke/mindustry/content/TechTree.java b/core/src/io/anuke/mindustry/content/TechTree.java index db98cb4877..c16d27e486 100644 --- a/core/src/io/anuke/mindustry/content/TechTree.java +++ b/core/src/io/anuke/mindustry/content/TechTree.java @@ -281,8 +281,7 @@ public class TechTree implements ContentList{ } private TechNode node(Block block){ - return node(block, () -> { - }); + return node(block, () -> {}); } public static class TechNode{ diff --git a/core/src/io/anuke/mindustry/graphics/Pixelator.java b/core/src/io/anuke/mindustry/graphics/Pixelator.java index afc4b91cd8..e8a9e0d2f3 100644 --- a/core/src/io/anuke/mindustry/graphics/Pixelator.java +++ b/core/src/io/anuke/mindustry/graphics/Pixelator.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.graphics; import io.anuke.arc.Core; import io.anuke.arc.graphics.Blending; +import io.anuke.arc.graphics.Texture.TextureFilter; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.glutils.FrameBuffer; import io.anuke.arc.util.Disposable; @@ -15,6 +16,10 @@ import static io.anuke.mindustry.Vars.renderer; public class Pixelator implements Disposable{ private FrameBuffer buffer = new FrameBuffer(2, 2); + { + buffer.getTexture().setFilter(TextureFilter.Nearest, TextureFilter.Nearest); + } + public void drawPixelate(){ float pre = renderer.getScale(); float scale = renderer.getScale(); diff --git a/core/src/io/anuke/mindustry/world/BlockStorage.java b/core/src/io/anuke/mindustry/world/BlockStorage.java index b6c6f2e0c1..0484676931 100644 --- a/core/src/io/anuke/mindustry/world/BlockStorage.java +++ b/core/src/io/anuke/mindustry/world/BlockStorage.java @@ -154,15 +154,13 @@ public abstract class BlockStorage extends UnlockableContent{ return flow; }else if(ofract > 0.1f && fract > 0.1f){ Liquid other = next.entity.liquids.current(); - if((other.flammability > 0.3f && liquid.temperature > 0.7f) || - (liquid.flammability > 0.3f && other.temperature > 0.7f)){ + if((other.flammability > 0.3f && liquid.temperature > 0.7f) || (liquid.flammability > 0.3f && other.temperature > 0.7f)){ tile.entity.damage(1 * Time.delta()); next.entity.damage(1 * Time.delta()); if(Mathf.chance(0.1 * Time.delta())){ Effects.effect(Fx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); } - }else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || - (other.temperature > 0.7f && liquid.temperature < 0.55f)){ + }else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || (other.temperature > 0.7f && liquid.temperature < 0.55f)){ tile.entity.liquids.remove(liquid, Math.min(tile.entity.liquids.get(liquid), 0.7f * Time.delta())); if(Mathf.chance(0.2f * Time.delta())){ Effects.effect(Fx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f);