diff --git a/core/assets/sounds/plantBreak.ogg b/core/assets/sounds/plantBreak.ogg new file mode 100644 index 0000000000..08d911b3e7 Binary files /dev/null and b/core/assets/sounds/plantBreak.ogg differ diff --git a/core/assets/sounds/rockBreak.ogg b/core/assets/sounds/rockBreak.ogg new file mode 100644 index 0000000000..6a17a5edc2 Binary files /dev/null and b/core/assets/sounds/rockBreak.ogg differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index fcadf439f9..b2971a8bc1 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -368,6 +368,7 @@ public class Blocks implements ContentList{ sporeCluster = new Prop("spore-cluster"){{ variants = 3; + breakSound = Sounds.plantBreak; }}; boulder = new Prop("boulder"){{ diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 24d4e5cb3e..3ccc414500 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1442,7 +1442,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, @Override public void killed(){ Events.fire(new BlockDestroyEvent(tile)); - block.breakSound.at(tile); + block.destroySound.at(tile); onDestroyed(); tile.remove(); remove(); diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 2fccf0130b..d7a52caf4b 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -190,8 +190,10 @@ public class Block extends UnlockableContent{ public int outlinedIcon = -1; /** Whether this block has a shadow under it. */ public boolean hasShadow = true; - /** Sounds made when this block breaks.*/ - public Sound breakSound = Sounds.boom; + /** Sounds made when this block is destroyed.*/ + public Sound destroySound = Sounds.boom; + /** Sound made when this block is deconstructed. */ + public Sound breakSound = Sounds.breaks; /** How reflective this block is. */ public float albedo = 0f; /** Environmental passive light color. */ diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index 4c2fc98b1c..a3a66b1280 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -47,7 +47,7 @@ public class ConstructBlock extends Block{ /** Returns a ConstructBlock by size. */ public static ConstructBlock get(int size){ - if(size > maxBlockSize) throw new IllegalArgumentException("No. Don't place ConstructBlock of size greater than " + maxBlockSize); + if(size > maxBlockSize) throw new IllegalArgumentException("No. Don't place ConstructBlocks of size greater than " + maxBlockSize); return consBlocks[size - 1]; } @@ -57,7 +57,7 @@ public class ConstructBlock extends Block{ block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor); Events.fire(new BlockBuildEndEvent(tile, builder, team, true, null)); tile.remove(); - if(shouldPlay()) Sounds.breaks.at(tile, calcPitch(false)); + if(shouldPlay()) block.breakSound.at(tile, calcPitch(false)); } @Remote(called = Loc.server) diff --git a/core/src/mindustry/world/blocks/environment/Prop.java b/core/src/mindustry/world/blocks/environment/Prop.java index 45da9aae88..0e7807acdd 100644 --- a/core/src/mindustry/world/blocks/environment/Prop.java +++ b/core/src/mindustry/world/blocks/environment/Prop.java @@ -4,15 +4,18 @@ import arc.*; import arc.graphics.g2d.*; import arc.math.*; import mindustry.content.*; +import mindustry.gen.*; import mindustry.world.*; public class Prop extends Block{ + public Prop(String name){ super(name); breakable = true; alwaysReplace = true; instantDeconstruct = true; breakEffect = Fx.breakProp; + breakSound = Sounds.rockBreak; } @Override