mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Pulverizer texture cleanup
This commit is contained in:
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 |
Binary file not shown.
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 306 B |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 114 B |
|
|
@ -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};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue