Attribute tweaks

This commit is contained in:
Anuken
2020-03-07 13:56:57 -05:00
parent 1e0067d64b
commit 7b144cbec6
3 changed files with 7 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ public class SolidPump extends Pump{
@Override
public void drawPlace(int x, int y, int rotation, boolean valid){
if(attribute != null){
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", (sumAttribute(attribute, x, y) + 1f) * 100 * percentSolid(x, y), 1), x, y, valid);
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", Math.max(sumAttribute(attribute, x, y) + 1f, 0f) * 100 * percentSolid(x, y), 1), x, y, valid);
}
}
@@ -120,6 +120,7 @@ public class SolidPump extends Pump{
}
fraction += boost;
fraction = Math.max(fraction, 0);
if(cons.valid() && typeLiquid() < liquidCapacity - 0.001f){
float maxPump = Math.min(liquidCapacity - typeLiquid(), pumpAmount * delta() * fraction * efficiency());