diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index dbc39105b4..b5aabbb0ed 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -220,16 +220,18 @@ public class Blocks implements ContentList{ }}; ignarock = new Floor("ignarock"){{ - + attributes.set(Attribute.water, -0.1f); }}; hotrock = new Floor("hotrock"){{ attributes.set(Attribute.heat, 0.5f); + attributes.set(Attribute.water, -0.2f); blendGroup = ignarock; }}; magmarock = new Floor("magmarock"){{ attributes.set(Attribute.heat, 0.75f); + attributes.set(Attribute.water, -0.5f); updateEffect = Fx.magmasmoke; blendGroup = ignarock; }}; @@ -254,6 +256,7 @@ public class Blocks implements ContentList{ salt = new Floor("salt"){{ variants = 0; + attributes.set(Attribute.water, -0.2f); }}; snow = new Floor("snow"){{ diff --git a/core/src/mindustry/world/blocks/production/SolidPump.java b/core/src/mindustry/world/blocks/production/SolidPump.java index 13211f7558..9c77fe1ef7 100644 --- a/core/src/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/mindustry/world/blocks/production/SolidPump.java @@ -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()); diff --git a/core/src/mindustry/world/meta/BlockStats.java b/core/src/mindustry/world/meta/BlockStats.java index d91e25bc31..122ec2bd11 100644 --- a/core/src/mindustry/world/meta/BlockStats.java +++ b/core/src/mindustry/world/meta/BlockStats.java @@ -1,6 +1,5 @@ package mindustry.world.meta; -import arc.math.*; import arc.struct.*; import arc.struct.ObjectMap.*; import mindustry.*; @@ -40,7 +39,7 @@ public class BlockStats{ public void add(BlockStat stat, Attribute attr){ for(Block block : Vars.content.blocks()){ - if(!block.isFloor() || Mathf.zero(block.asFloor().attributes.get(attr))) continue; + if(!block.isFloor() || block.asFloor().attributes.get(attr) <= 0) continue; add(stat, new FloorValue(block.asFloor())); } }