Fixed squished pump liquid icon

This commit is contained in:
Anuken 2022-08-04 18:45:51 -04:00
parent f9c73c2fdc
commit 62d0d62d22

View File

@ -58,10 +58,11 @@ public class Pump extends LiquidBlock{
if(liquidDrop != null){
float width = drawPlaceText(Core.bundle.formatFloat("bar.pumpspeed", amount * pumpAmount * 60f, 0), x, y, valid);
float dx = x * tilesize + offset - width/2f - 4f, dy = y * tilesize + offset + size * tilesize / 2f + 5, s = iconSmall / 4f;
float ratio = (float)liquidDrop.fullIcon.width / liquidDrop.fullIcon.height;
Draw.mixcol(Color.darkGray, 1f);
Draw.rect(liquidDrop.fullIcon, dx, dy - 1, s, s);
Draw.rect(liquidDrop.fullIcon, dx, dy - 1, s * ratio, s);
Draw.reset();
Draw.rect(liquidDrop.fullIcon, dx, dy, s, s);
Draw.rect(liquidDrop.fullIcon, dx, dy, s * ratio, s);
}
}