From d95662233cba707f804d0dfc21f9f958321d3f5b Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 2 Oct 2021 12:05:02 -0400 Subject: [PATCH] Fixed #6090 --- core/src/mindustry/input/InputHandler.java | 1 + core/src/mindustry/world/blocks/production/SolidPump.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index ca8e248a85..0e0f897c85 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1186,6 +1186,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ } public boolean validPlace(int x, int y, Block type, int rotation, BuildPlan ignore){ + //TODO with many requests, this is O(n * m), very laggy for(BuildPlan req : player.unit().plans()){ if(req != ignore && !req.breaking diff --git a/core/src/mindustry/world/blocks/production/SolidPump.java b/core/src/mindustry/world/blocks/production/SolidPump.java index d65e3ecf26..8098bebd59 100644 --- a/core/src/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/mindustry/world/blocks/production/SolidPump.java @@ -46,7 +46,7 @@ public class SolidPump extends Pump{ public void setBars(){ super.setBars(); bars.add("efficiency", (SolidPumpBuild entity) -> new Bar(() -> Core.bundle.formatFloat("bar.pumpspeed", - entity.lastPump / Time.delta * 60, 1), + entity.lastPump * 60, 1), () -> Pal.ammo, () -> entity.warmup * entity.efficiency())); } @@ -115,7 +115,7 @@ public class SolidPump extends Pump{ if(cons.valid() && typeLiquid() < liquidCapacity - 0.001f){ float maxPump = Math.min(liquidCapacity - typeLiquid(), pumpAmount * delta() * fraction * efficiency()); liquids.add(result, maxPump); - lastPump = maxPump; + lastPump = maxPump / Time.delta; warmup = Mathf.lerpDelta(warmup, 1f, 0.02f); if(Mathf.chance(delta() * updateEffectChance)) updateEffect.at(x + Mathf.range(size * 2f), y + Mathf.range(size * 2f));