Cleanup, bugfixes

This commit is contained in:
Anuken
2019-04-19 23:07:21 -04:00
parent f283709e62
commit 9d67c36c32
4 changed files with 10 additions and 12 deletions
@@ -112,10 +112,7 @@ public class Blocks implements ContentList{
part = new BlockPart(); part = new BlockPart();
spawn = new Block("spawn"){ spawn = new Block("spawn");
public void drawShadow(Tile tile){
}
};
//Registers build blocks from size 1-6 //Registers build blocks from size 1-6
//no reference is needed here since they can be looked up by name later //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; }}; darkPanel5 = new Floor("dark-panel-5"){{ variants = 0; }};
darkPanel6 = new Floor("dark-panel-6"){{ variants = 0; }}; darkPanel6 = new Floor("dark-panel-6"){{ variants = 0; }};
darkMetal = new StaticWall("dark-metal"){{ darkMetal = new StaticWall("dark-metal");
}};
pebbles = new OverlayFloor("pebbles"); pebbles = new OverlayFloor("pebbles");
@@ -281,8 +281,7 @@ public class TechTree implements ContentList{
} }
private TechNode node(Block block){ private TechNode node(Block block){
return node(block, () -> { return node(block, () -> {});
});
} }
public static class TechNode{ public static class TechNode{
@@ -2,6 +2,7 @@ package io.anuke.mindustry.graphics;
import io.anuke.arc.Core; import io.anuke.arc.Core;
import io.anuke.arc.graphics.Blending; 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.g2d.Draw;
import io.anuke.arc.graphics.glutils.FrameBuffer; import io.anuke.arc.graphics.glutils.FrameBuffer;
import io.anuke.arc.util.Disposable; import io.anuke.arc.util.Disposable;
@@ -15,6 +16,10 @@ import static io.anuke.mindustry.Vars.renderer;
public class Pixelator implements Disposable{ public class Pixelator implements Disposable{
private FrameBuffer buffer = new FrameBuffer(2, 2); private FrameBuffer buffer = new FrameBuffer(2, 2);
{
buffer.getTexture().setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
}
public void drawPixelate(){ public void drawPixelate(){
float pre = renderer.getScale(); float pre = renderer.getScale();
float scale = renderer.getScale(); float scale = renderer.getScale();
@@ -154,15 +154,13 @@ public abstract class BlockStorage extends UnlockableContent{
return flow; return flow;
}else if(ofract > 0.1f && fract > 0.1f){ }else if(ofract > 0.1f && fract > 0.1f){
Liquid other = next.entity.liquids.current(); Liquid other = next.entity.liquids.current();
if((other.flammability > 0.3f && liquid.temperature > 0.7f) || if((other.flammability > 0.3f && liquid.temperature > 0.7f) || (liquid.flammability > 0.3f && other.temperature > 0.7f)){
(liquid.flammability > 0.3f && other.temperature > 0.7f)){
tile.entity.damage(1 * Time.delta()); tile.entity.damage(1 * Time.delta());
next.entity.damage(1 * Time.delta()); next.entity.damage(1 * Time.delta());
if(Mathf.chance(0.1 * Time.delta())){ if(Mathf.chance(0.1 * Time.delta())){
Effects.effect(Fx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); Effects.effect(Fx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f);
} }
}else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || }else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || (other.temperature > 0.7f && liquid.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())); tile.entity.liquids.remove(liquid, Math.min(tile.entity.liquids.get(liquid), 0.7f * Time.delta()));
if(Mathf.chance(0.2f * Time.delta())){ if(Mathf.chance(0.2f * Time.delta())){
Effects.effect(Fx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); Effects.effect(Fx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f);