diff --git a/core/assets/sounds/block/blockRepair.ogg b/core/assets/sounds/block/blockRepair.ogg new file mode 100644 index 0000000000..adb33a1c32 Binary files /dev/null and b/core/assets/sounds/block/blockRepair.ogg differ diff --git a/core/assets/sounds/block/blockRotate.ogg b/core/assets/sounds/block/blockRotate.ogg new file mode 100644 index 0000000000..7de34c8403 Binary files /dev/null and b/core/assets/sounds/block/blockRotate.ogg differ diff --git a/core/assets/sounds/explosions/blockExplode2Alt.ogg b/core/assets/sounds/explosions/blockExplode2Alt.ogg new file mode 100644 index 0000000000..530d71678a Binary files /dev/null and b/core/assets/sounds/explosions/blockExplode2Alt.ogg differ diff --git a/core/assets/sounds/explosions/afflictExplosion.ogg b/core/assets/sounds/explosions/explosionAfflict.ogg similarity index 100% rename from core/assets/sounds/explosions/afflictExplosion.ogg rename to core/assets/sounds/explosions/explosionAfflict.ogg diff --git a/core/assets/sounds/explosions/artilleryExplosion.ogg b/core/assets/sounds/explosions/explosionArtillery.ogg similarity index 100% rename from core/assets/sounds/explosions/artilleryExplosion.ogg rename to core/assets/sounds/explosions/explosionArtillery.ogg diff --git a/core/assets/sounds/explosions/artilleryShockExplosion.ogg b/core/assets/sounds/explosions/explosionArtilleryShock.ogg similarity index 100% rename from core/assets/sounds/explosions/artilleryShockExplosion.ogg rename to core/assets/sounds/explosions/explosionArtilleryShock.ogg diff --git a/core/assets/sounds/explosions/artilleryShockExplosionBig.ogg b/core/assets/sounds/explosions/explosionArtilleryShockBig.ogg similarity index 100% rename from core/assets/sounds/explosions/artilleryShockExplosionBig.ogg rename to core/assets/sounds/explosions/explosionArtilleryShockBig.ogg diff --git a/core/assets/sounds/explosions/coreExplode.ogg b/core/assets/sounds/explosions/explosionCore.ogg similarity index 100% rename from core/assets/sounds/explosions/coreExplode.ogg rename to core/assets/sounds/explosions/explosionCore.ogg diff --git a/core/assets/sounds/explosions/crawlerExplosion.ogg b/core/assets/sounds/explosions/explosionCrawler.ogg similarity index 100% rename from core/assets/sounds/explosions/crawlerExplosion.ogg rename to core/assets/sounds/explosions/explosionCrawler.ogg diff --git a/core/assets/sounds/explosions/dullExplosion.ogg b/core/assets/sounds/explosions/explosionDull.ogg similarity index 100% rename from core/assets/sounds/explosions/dullExplosion.ogg rename to core/assets/sounds/explosions/explosionDull.ogg diff --git a/core/assets/sounds/explosions/largeExplosion.ogg b/core/assets/sounds/explosions/explosionMissile.ogg similarity index 100% rename from core/assets/sounds/explosions/largeExplosion.ogg rename to core/assets/sounds/explosions/explosionMissile.ogg diff --git a/core/assets/sounds/explosions/explodePlasma.ogg b/core/assets/sounds/explosions/explosionQuad.ogg similarity index 100% rename from core/assets/sounds/explosions/explodePlasma.ogg rename to core/assets/sounds/explosions/explosionQuad.ogg diff --git a/core/assets/sounds/explosions/reactorExplosion.ogg b/core/assets/sounds/explosions/explosionReactor.ogg similarity index 100% rename from core/assets/sounds/explosions/reactorExplosion.ogg rename to core/assets/sounds/explosions/explosionReactor.ogg diff --git a/core/assets/sounds/explosions/reactorExplosion2.ogg b/core/assets/sounds/explosions/explosionReactor2.ogg similarity index 100% rename from core/assets/sounds/explosions/reactorExplosion2.ogg rename to core/assets/sounds/explosions/explosionReactor2.ogg diff --git a/core/assets/sounds/explosions/explosionReactorNeoplasm.ogg b/core/assets/sounds/explosions/explosionReactorNeoplasm.ogg new file mode 100644 index 0000000000..a2471d0a3b Binary files /dev/null and b/core/assets/sounds/explosions/explosionReactorNeoplasm.ogg differ diff --git a/core/assets/sounds/explosions/titanExplosion.ogg b/core/assets/sounds/explosions/explosionTitan.ogg similarity index 100% rename from core/assets/sounds/explosions/titanExplosion.ogg rename to core/assets/sounds/explosions/explosionTitan.ogg diff --git a/core/src/mindustry/audio/SoundPriority.java b/core/src/mindustry/audio/SoundPriority.java index 857c172fc5..535d1df26a 100644 --- a/core/src/mindustry/audio/SoundPriority.java +++ b/core/src/mindustry/audio/SoundPriority.java @@ -19,10 +19,11 @@ public class SoundPriority{ beamMeltdown, beamLustre, beamPlasma, - reactorExplosion, - reactorExplosion2, - coreExplode, - blockExplodeElectricBig, blockExplodeExplosive + explosionReactor, + explosionReactor2, + explosionReactorNeoplasm, + explosionCore, + blockExplodeElectricBig, blockExplodeExplosive, blockExplodeExplosiveAlt ); //priority 1.5: big weapon sounds, not loops @@ -35,7 +36,14 @@ public class SoundPriority{ shootCorvus, chargeCorvus, chargeVela, - chargeLancer + chargeLancer, + shootReign, + shootEclipse, + shootArtillerySapBig, + shootToxopidShotgun, + beamPlasmaSmall, + shootNavanax, + explosionNavanax ); //priority 1: ambient noises @@ -78,7 +86,7 @@ public class SoundPriority{ //step sounds are low priority set(-2f, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall); - coreExplode.setFalloffOffset(100f); + explosionCore.setFalloffOffset(100f); } static void max(int max, Sound... sounds){ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index e0bd7b7890..bcf2d0e39f 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2807,7 +2807,7 @@ public class Blocks{ explosionRadius = 9; explosionDamage = 2000; explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Liquids.neoplasm.color), Fx.neoplasmSplat); - explodeSound = Sounds.largeExplosion; + explodeSound = Sounds.explosionReactorNeoplasm; powerProduction = 140f; @@ -4619,7 +4619,7 @@ public class Blocks{ backColor = hitColor = trailColor = Color.valueOf("ea8878").lerp(Pal.redLight, 0.5f); frontColor = Color.white; ammoMultiplier = 1f; - hitSound = Sounds.titanExplosion; + hitSound = Sounds.explosionTitan; status = StatusEffects.blasted; @@ -4653,7 +4653,7 @@ public class Blocks{ backColor = hitColor = trailColor = Color.valueOf("ab8ec5"); frontColor = Color.white; ammoMultiplier = 1f; - hitSound = Sounds.titanExplosion; + hitSound = Sounds.explosionTitan; status = StatusEffects.blasted; @@ -4713,7 +4713,7 @@ public class Blocks{ hitColor = backColor = trailColor = Color.valueOf("a0b380"); frontColor = Color.valueOf("e4ffd6"); ammoMultiplier = 1f; - hitSound = Sounds.titanExplosion; + hitSound = Sounds.explosionTitan; trailLength = 32; trailWidth = 3.35f; @@ -5007,7 +5007,7 @@ public class Blocks{ waveRad = 40f; }}; - despawnSound = Sounds.afflictExplosion; + despawnSound = Sounds.explosionAfflict; shootSound = Sounds.shootAfflict; fragBullet = intervalBullet = new BasicBulletType(3f, 35){{ @@ -5183,7 +5183,7 @@ public class Blocks{ lowAltitude = true; loopSound = Sounds.loopMissileTrail; loopSoundVolume = 0.6f; - deathSound = Sounds.largeExplosion; + deathSound = Sounds.explosionMissile; targetAir = false; targetUnderBlocks = false; @@ -5270,7 +5270,7 @@ public class Blocks{ lowAltitude = true; loopSound = Sounds.loopMissileTrail; loopSoundVolume = 0.6f; - deathSound = Sounds.largeExplosion; + deathSound = Sounds.explosionMissile; targetAir = false; targetUnderBlocks = false; @@ -5376,7 +5376,7 @@ public class Blocks{ lowAltitude = true; loopSound = Sounds.loopMissileTrail; loopSoundVolume = 0.6f; - deathSound = Sounds.largeExplosion; + deathSound = Sounds.explosionMissile; targetAir = false; targetUnderBlocks = false; @@ -5431,7 +5431,7 @@ public class Blocks{ lowAltitude = true; loopSound = Sounds.loopMissileTrail; loopSoundVolume = 0.6f; - deathSound = Sounds.largeExplosion; + deathSound = Sounds.explosionMissile; targetAir = false; targetUnderBlocks = false; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 06d0dcbcb3..e232244e6c 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -648,7 +648,7 @@ public class UnitTypes{ reload = 24f; shootCone = 180f; ejectEffect = Fx.none; - shootSound = Sounds.crawlerExplosion; + shootSound = Sounds.explosionCrawler; shootSoundVolume = 0.4f; x = shootY = 0f; mirror = false; @@ -864,7 +864,7 @@ public class UnitTypes{ bullet = new ArtilleryBulletType(2f, 12){{ hitEffect = Fx.sapExplosion; - despawnSound = Sounds.artilleryShockExplosion; + despawnSound = Sounds.explosionArtilleryShock; knockback = 0.8f; lifetime = 70f; width = height = 19f; @@ -965,7 +965,7 @@ public class UnitTypes{ rotationLimit = 80f; bullet = new ArtilleryBulletType(3f, 50){{ - despawnSound = Sounds.artilleryShockExplosionBig; + despawnSound = Sounds.explosionArtilleryShockBig; hitEffect = Fx.sapExplosion; knockback = 0.8f; lifetime = 80f; @@ -991,7 +991,7 @@ public class UnitTypes{ fragBullets = 9; fragBullet = new ArtilleryBulletType(2.3f, 30){{ - despawnSound = Sounds.artilleryShockExplosion; + despawnSound = Sounds.explosionArtilleryShock; hitEffect = Fx.sapExplosion; knockback = 0.8f; lifetime = 90f; @@ -1481,7 +1481,7 @@ public class UnitTypes{ frontColor = Color.white; mixColorTo = Color.white; - hitSound = Sounds.explodePlasma; + hitSound = Sounds.explosionQuad; shootCone = 180f; ejectEffect = Fx.none; @@ -2451,9 +2451,9 @@ public class UnitTypes{ x = 2.75f; y = 1f; top = false; + shootSound = Sounds.shootAlpha; bullet = new LaserBoltBulletType(2.5f, 11){{ - shootSound = Sounds.shootAlpha; keepVelocity = false; width = 1.5f; height = 4.5f; @@ -2500,9 +2500,9 @@ public class UnitTypes{ recoil = 1f; shoot.shots = 2; shoot.shotDelay = 4f; + shootSound = Sounds.shootAlpha; bullet = new LaserBoltBulletType(3f, 11){{ - shootSound = Sounds.shootAlpha; keepVelocity = false; width = 1.5f; height = 4.5f; @@ -2553,9 +2553,9 @@ public class UnitTypes{ }}; inaccuracy = 3f; + shootSound = Sounds.shootAlpha; bullet = new LaserBoltBulletType(3.5f, 11){{ - shootSound = Sounds.shootAlpha; keepVelocity = false; width = 1.5f; height = 5f; @@ -2721,7 +2721,7 @@ public class UnitTypes{ researchCostMultiplier = 0f; weapons.add(new Weapon("precept-weapon"){{ - shootSound = Sounds.dullExplosion; + shootSound = Sounds.explosionDull; layerOffset = 0.0001f; reload = 80f; shootY = 16f; @@ -2835,7 +2835,7 @@ public class UnitTypes{ fragSpread = 10f; fragBullets = 5; fragVelocityMin = 1f; - despawnSound = Sounds.dullExplosion; + despawnSound = Sounds.explosionDull; fragBullet = new BasicBulletType(8f, 35){{ sprite = "missile-large"; @@ -3507,7 +3507,7 @@ public class UnitTypes{ trailWidth = 2.8f; trailLength = 20; trailChance = -1f; - despawnSound = Sounds.dullExplosion; + despawnSound = Sounds.explosionDull; despawnEffect = Fx.none; hitEffect = new ExplosionEffect(){{ @@ -3629,7 +3629,7 @@ public class UnitTypes{ trailChance = -1f; despawnEffect = Fx.none; - despawnSound = Sounds.dullExplosion; + despawnSound = Sounds.explosionDull; hitEffect = despawnEffect = new ExplosionEffect(){{ lifetime = 50f; @@ -3876,7 +3876,7 @@ public class UnitTypes{ }}); smokeEffect = Fx.shootSmokeTitan; hitColor = Pal.sapBullet; - despawnSound = Sounds.artilleryShockExplosion; + despawnSound = Sounds.explosionArtilleryShock; sprite = "large-orb"; trailEffect = Fx.missileTrail; diff --git a/core/src/mindustry/entities/bullet/ArtilleryBulletType.java b/core/src/mindustry/entities/bullet/ArtilleryBulletType.java index 027899b184..d220a2e29c 100644 --- a/core/src/mindustry/entities/bullet/ArtilleryBulletType.java +++ b/core/src/mindustry/entities/bullet/ArtilleryBulletType.java @@ -14,7 +14,7 @@ public class ArtilleryBulletType extends BasicBulletType{ collidesAir = false; scaleLife = true; hitShake = 1f; - hitSound = Sounds.artilleryExplosion; + hitSound = Sounds.explosionArtillery; hitEffect = Fx.flakExplosion; shootEffect = Fx.shootBig; trailEffect = Fx.artilleryTrail; diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index ac2c61ae0e..c4263b7323 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -682,6 +682,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ build.updateProximity(); build.noSleep(); Fx.rotateBlock.at(build.x, build.y, build.block.size); + if(!headless) Sounds.blockRotate.at(build, 1f + Mathf.range(0.1f), 1f); Events.fire(new BuildRotateEvent(build, player == null ? null : player.unit(), previous)); } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index e34182a297..9c02c7c7ae 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -1263,7 +1263,7 @@ public class Block extends UnlockableContent implements Senseable{ if(destroySound == Sounds.unset){ destroySound = size >= 3 ? Sounds.blockExplode3 : - size >= 2 ? Sounds.blockExplode2 : + size >= 2 ? new RandomSound(Sounds.blockExplode2, Sounds.blockExplode2Alt) : new RandomSound(Sounds.blockExplode1, Sounds.blockExplode1Alt); } diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 228331d06f..0959de0176 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -87,6 +87,7 @@ public class Build{ tile.build.noSleep(); Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size); Events.fire(new BuildRotateEvent(tile.build, unit, previous)); + if(!headless) Sounds.blockRotate.at(tile.build, 1f + Mathf.range(0.1f), 1f); return; } @@ -108,7 +109,7 @@ public class Build{ if(fogControl.isVisibleTile(team, tile.x, tile.y)){ result.placeEffect.at(tile.drawx(), tile.drawy(), result.size); Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size); - //doesn't play a sound + ConstructBlock.playRepairSound(team, tile); } Events.fire(new BlockBuildEndEvent(tile, unit, team, false, tile.build.config())); diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index e1b3296843..68a5475d19 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -144,6 +144,10 @@ public class ConstructBlock extends Block{ } } + public static void playRepairSound(Team team, Tile tile){ + if(!headless && shouldPlay() && fogControl.isVisibleTile(team, tile.x, tile.y)) Sounds.blockRepair.at(tile, calcPitch(true)); + } + public static void constructed(Tile tile, Block block, Unit builder, byte rotation, Team team, Object config){ Call.constructFinish(tile, block, builder, rotation, team, config); if(tile.build != null){ diff --git a/core/src/mindustry/world/blocks/defense/Wall.java b/core/src/mindustry/world/blocks/defense/Wall.java index 25aebab907..f0ef2962e1 100644 --- a/core/src/mindustry/world/blocks/defense/Wall.java +++ b/core/src/mindustry/world/blocks/defense/Wall.java @@ -41,7 +41,6 @@ public class Wall extends Block{ //it's a wall of course it's supported everywhere envEnabled = Env.any; - destroySound = Sounds.blockExplodeWall; } @Override @@ -55,6 +54,12 @@ public class Wall extends Block{ } } + @Override + public void init(){ + if(size == 2 && destroySound == Sounds.unset) destroySound = Sounds.blockExplodeWall; + super.init(); + } + @Override public TextureRegion[] icons(){ return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")}; diff --git a/core/src/mindustry/world/blocks/power/ImpactReactor.java b/core/src/mindustry/world/blocks/power/ImpactReactor.java index 03795fe837..8ba3e4d956 100644 --- a/core/src/mindustry/world/blocks/power/ImpactReactor.java +++ b/core/src/mindustry/world/blocks/power/ImpactReactor.java @@ -38,7 +38,7 @@ public class ImpactReactor extends PowerGenerator{ explosionDamage = 1900 * 4; explosionMinWarmup = 0.3f; explodeEffect = Fx.impactReactorExplosion; - explodeSound = Sounds.reactorExplosion2; + explodeSound = Sounds.explosionReactor2; } @Override diff --git a/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index 756f2a8eef..3701ee5d84 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -68,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{ explosionDamage = 1250 * 4; explodeEffect = Fx.reactorExplosion; - explodeSound = Sounds.reactorExplosion; + explodeSound = Sounds.explosionReactor; } @Override diff --git a/core/src/mindustry/world/blocks/power/VariableReactor.java b/core/src/mindustry/world/blocks/power/VariableReactor.java index ad5d27d913..bcfc2e8975 100644 --- a/core/src/mindustry/world/blocks/power/VariableReactor.java +++ b/core/src/mindustry/world/blocks/power/VariableReactor.java @@ -41,7 +41,7 @@ public class VariableReactor extends PowerGenerator{ explosionRadius = 16; explosionDamage = 1500; explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Color.valueOf("e3ae6f"))); - explodeSound = Sounds.reactorExplosion2; + explodeSound = Sounds.explosionReactor2; explosionPuddles = 70; explosionPuddleRange = tilesize * 6f; diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 0493fd9c70..47246c9f88 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -82,7 +82,7 @@ public class CoreBlock extends StorageBlock{ //support everything replaceable = false; - destroySound = Sounds.coreExplode; + destroySound = Sounds.explosionCore; destroySoundVolume = 1.6f; }