This commit is contained in:
Anuken 2021-10-02 12:05:02 -04:00
parent ce7e91f17b
commit d95662233c
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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));