From 62d0d62d2297c6b73d15bc015f932d31df843526 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 4 Aug 2022 18:45:51 -0400 Subject: [PATCH] Fixed squished pump liquid icon --- core/src/mindustry/world/blocks/production/Pump.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/world/blocks/production/Pump.java b/core/src/mindustry/world/blocks/production/Pump.java index 0935cc4b4d..72f50b7eb1 100644 --- a/core/src/mindustry/world/blocks/production/Pump.java +++ b/core/src/mindustry/world/blocks/production/Pump.java @@ -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); } }