diff --git a/core/assets-raw/sprites/items/liquid-cryofluid.png b/core/assets-raw/sprites/items/liquid-cryofluid.png index a72f3b4d62..760127f369 100644 Binary files a/core/assets-raw/sprites/items/liquid-cryofluid.png and b/core/assets-raw/sprites/items/liquid-cryofluid.png differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 673d66e77a..e62a70f62a 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2412,7 +2412,7 @@ public class Blocks{ }}; solarPanel = new SolarGenerator("solar-panel"){{ - requirements(Category.power, with(Items.lead, 10, Items.silicon, 10)); + requirements(Category.power, with(Items.lead, 10, Items.silicon, 8)); powerProduction = 0.12f; }}; diff --git a/core/src/mindustry/entities/comp/LegsComp.java b/core/src/mindustry/entities/comp/LegsComp.java index 32ddc9b09f..cc57b1e87d 100644 --- a/core/src/mindustry/entities/comp/LegsComp.java +++ b/core/src/mindustry/entities/comp/LegsComp.java @@ -13,6 +13,7 @@ import mindustry.game.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.type.*; +import mindustry.world.blocks.*; import mindustry.world.blocks.environment.*; import static mindustry.Vars.*; @@ -194,6 +195,11 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{ if(type.legSplashDamage > 0 && !disarmed){ Damage.damage(team, l.base.x, l.base.y, type.legSplashRange, type.legSplashDamage * state.rules.unitDamage(team), false, true); + + var tile = Vars.world.tileWorld(l.base.x, l.base.y); + if(tile != null && tile.block().unitMoveBreakable){ + ConstructBlock.deconstructFinish(tile, tile.block(), self()); + } } } diff --git a/core/src/mindustry/entities/comp/TankComp.java b/core/src/mindustry/entities/comp/TankComp.java index afd4076ff5..eb324b2158 100644 --- a/core/src/mindustry/entities/comp/TankComp.java +++ b/core/src/mindustry/entities/comp/TankComp.java @@ -11,6 +11,7 @@ import mindustry.game.*; import mindustry.gen.*; import mindustry.type.*; import mindustry.world.*; +import mindustry.world.blocks.*; import mindustry.world.blocks.environment.*; import static mindustry.Vars.*; @@ -57,16 +58,20 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec for(int dx = -r; dx <= r; dx++){ for(int dy = -r; dy <= r; dy++){ Tile t = Vars.world.tileWorld(x + dx*tilesize, y + dy*tilesize); - if(t == null || t.solid()){ + if(t == null || t.solid()){ solids ++; } //TODO should this apply to the player team(s)? currently PvE due to balancing - if(type.crushDamage > 0 && !disarmed && (walked || deltaLen() >= 0.01f) && t != null && t.build != null && t.build.team != team + if(type.crushDamage > 0 && !disarmed && (walked || deltaLen() >= 0.01f) && t != null //damage radius is 1 tile smaller to prevent it from just touching walls as it passes && Math.max(Math.abs(dx), Math.abs(dy)) <= r - 1){ - t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier * state.rules.unitDamage(team)); + if(t.build != null && t.build.team != team){ + t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier * state.rules.unitDamage(team)); + }else if(t.block().unitMoveBreakable){ + ConstructBlock.deconstructFinish(t, t.block(), self()); + } } } } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 9daa65d5aa..45b45f707d 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -124,6 +124,8 @@ public class Block extends UnlockableContent implements Senseable{ public boolean saveData; /** whether you can break this with rightclick */ public boolean breakable; + /** if true, this block will be broken by certain units stepping/moving over it */ + public boolean unitMoveBreakable; /** whether to add this block to brokenblocks */ public boolean rebuildable = true; /** if true, this logic-related block can only be used with privileged processors (or is one itself) */ diff --git a/core/src/mindustry/world/blocks/environment/Prop.java b/core/src/mindustry/world/blocks/environment/Prop.java index 1564ee6795..44611e5ba3 100644 --- a/core/src/mindustry/world/blocks/environment/Prop.java +++ b/core/src/mindustry/world/blocks/environment/Prop.java @@ -16,6 +16,7 @@ public class Prop extends Block{ breakable = true; alwaysReplace = true; instantDeconstruct = true; + unitMoveBreakable = true; breakEffect = Fx.breakProp; breakSound = Sounds.rockBreak; }