Fixed tops of some generator blocks

This commit is contained in:
Anuken
2019-06-30 11:25:39 -04:00
parent c77f51b7ae
commit 3021cc29da
15 changed files with 2978 additions and 2954 deletions

View File

@@ -36,7 +36,7 @@ public class ItemLiquidGenerator extends PowerGenerator{
protected Effects.Effect generateEffect = Fx.generatespark;
protected Effects.Effect explodeEffect = Fx.generatespark;
protected Color heatColor = Color.valueOf("ff9b59");
protected TextureRegion topRegion;
protected TextureRegion topRegion, liquidRegion;
protected boolean randomlyExplode = false;
public ItemLiquidGenerator(boolean hasItems, boolean hasLiquids, String name){
@@ -59,6 +59,7 @@ public class ItemLiquidGenerator extends PowerGenerator{
if(hasItems){
topRegion = Core.atlas.find(name + "-top");
}
liquidRegion = Core.atlas.find(name + "-liquid");
}
@Override
@@ -151,15 +152,11 @@ public class ItemLiquidGenerator extends PowerGenerator{
if(hasLiquids){
Draw.color(entity.liquids.current().color);
Draw.alpha(entity.liquids.currentAmount() / liquidCapacity);
drawLiquidCenter(tile);
Draw.rect(liquidRegion, tile.drawx(), tile.drawy());
Draw.color();
}
}
public void drawLiquidCenter(Tile tile){
Draw.rect("blank", tile.drawx(), tile.drawy(), 2, 2);
}
protected float getItemEfficiency(Item item){
return 0.0f;
}

View File

@@ -2,8 +2,7 @@ package io.anuke.mindustry.world.blocks.power;
import io.anuke.arc.Core;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.math.geom.Vector2;
import io.anuke.arc.util.Time;
@@ -155,7 +154,7 @@ public class NuclearReactor extends PowerGenerator{
NuclearReactorEntity entity = tile.entity();
Draw.color(coolColor, hotColor, entity.heat);
Draw.rect("white", tile.drawx(), tile.drawy(), size * tilesize, size * tilesize);
Fill.rect(tile.drawx(), tile.drawy(), size * tilesize, size * tilesize);
Draw.color(entity.liquids.current().color);
Draw.alpha(entity.liquids.currentAmount() / liquidCapacity);