Fixed #6090
This commit is contained in:
@@ -1186,6 +1186,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean validPlace(int x, int y, Block type, int rotation, BuildPlan ignore){
|
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()){
|
for(BuildPlan req : player.unit().plans()){
|
||||||
if(req != ignore
|
if(req != ignore
|
||||||
&& !req.breaking
|
&& !req.breaking
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class SolidPump extends Pump{
|
|||||||
public void setBars(){
|
public void setBars(){
|
||||||
super.setBars();
|
super.setBars();
|
||||||
bars.add("efficiency", (SolidPumpBuild entity) -> new Bar(() -> Core.bundle.formatFloat("bar.pumpspeed",
|
bars.add("efficiency", (SolidPumpBuild entity) -> new Bar(() -> Core.bundle.formatFloat("bar.pumpspeed",
|
||||||
entity.lastPump / Time.delta * 60, 1),
|
entity.lastPump * 60, 1),
|
||||||
() -> Pal.ammo,
|
() -> Pal.ammo,
|
||||||
() -> entity.warmup * entity.efficiency()));
|
() -> entity.warmup * entity.efficiency()));
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ public class SolidPump extends Pump{
|
|||||||
if(cons.valid() && typeLiquid() < liquidCapacity - 0.001f){
|
if(cons.valid() && typeLiquid() < liquidCapacity - 0.001f){
|
||||||
float maxPump = Math.min(liquidCapacity - typeLiquid(), pumpAmount * delta() * fraction * efficiency());
|
float maxPump = Math.min(liquidCapacity - typeLiquid(), pumpAmount * delta() * fraction * efficiency());
|
||||||
liquids.add(result, maxPump);
|
liquids.add(result, maxPump);
|
||||||
lastPump = maxPump;
|
lastPump = maxPump / Time.delta;
|
||||||
warmup = Mathf.lerpDelta(warmup, 1f, 0.02f);
|
warmup = Mathf.lerpDelta(warmup, 1f, 0.02f);
|
||||||
if(Mathf.chance(delta() * updateEffectChance))
|
if(Mathf.chance(delta() * updateEffectChance))
|
||||||
updateEffect.at(x + Mathf.range(size * 2f), y + Mathf.range(size * 2f));
|
updateEffect.at(x + Mathf.range(size * 2f), y + Mathf.range(size * 2f));
|
||||||
|
|||||||
Reference in New Issue
Block a user