mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-07 05:50:54 +07:00
Fixed #6090
This commit is contained in:
parent
ce7e91f17b
commit
d95662233c
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user