Pulverizer texture cleanup

This commit is contained in:
Anuken 2021-06-10 16:14:53 -04:00
parent a0acf1a040
commit c4803d29da
5 changed files with 15 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 216 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 306 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 114 B

Before After
Before After

View file

@ -10,16 +10,19 @@ import mindustry.world.blocks.production.GenericCrafter.*;
public class DrawLiquid extends DrawBlock{
public TextureRegion liquid, top;
public void draw(GenericCrafterBuild entity){
Draw.rect(entity.block.region, entity.x, entity.y);
@Override
public void draw(GenericCrafterBuild build){
Draw.rect(build.block.region, build.x, build.y);
GenericCrafter type = (GenericCrafter)build.block;
if(entity.liquids.total() > 0.001f){
Drawf.liquid(liquid, entity.x, entity.y,
entity.liquids.get(((GenericCrafter)entity.block).outputLiquid.liquid) / entity.block.liquidCapacity,
((GenericCrafter)entity.block).outputLiquid.liquid.color);
if(type.outputLiquid != null && build.liquids.get(type.outputLiquid.liquid) > 0){
Drawf.liquid(liquid, build.x, build.y,
build.liquids.get(type.outputLiquid.liquid) / type.liquidCapacity,
type.outputLiquid.liquid.color
);
}
if(top.found()) Draw.rect(top, entity.x, entity.y);
if(top.found()) Draw.rect(top, build.x, build.y);
}
@Override
@ -28,6 +31,7 @@ public class DrawLiquid extends DrawBlock{
liquid = Core.atlas.find(block.name + "-liquid");
}
@Override
public TextureRegion[] icons(Block block){
return top.found() ? new TextureRegion[]{block.region, top} : new TextureRegion[]{block.region};
}

View file

@ -9,10 +9,10 @@ public class DrawRotator extends DrawBlock{
public TextureRegion rotator, top;
@Override
public void draw(GenericCrafterBuild entity){
Draw.rect(entity.block.region, entity.x, entity.y);
Draw.rect(rotator, entity.x, entity.y, entity.totalProgress * 2f);
if(top.found()) Draw.rect(top, entity.x, entity.y);
public void draw(GenericCrafterBuild build){
Draw.rect(build.block.region, build.x, build.y);
Draw.rect(rotator, build.x, build.y, build.totalProgress * 2f);
if(top.found()) Draw.rect(top, build.x, build.y);
}
@Override