diff --git a/core/assets/sounds/artilleryExplosion.ogg b/core/assets/sounds/artilleryExplosion.ogg new file mode 100644 index 0000000000..a086448d68 Binary files /dev/null and b/core/assets/sounds/artilleryExplosion.ogg differ diff --git a/core/assets/sounds/fuse.ogg b/core/assets/sounds/fuse.ogg new file mode 100644 index 0000000000..bb6ffca750 Binary files /dev/null and b/core/assets/sounds/fuse.ogg differ diff --git a/core/assets/sounds/massdriver.ogg b/core/assets/sounds/massdriver.ogg new file mode 100644 index 0000000000..b6aa8e469b Binary files /dev/null and b/core/assets/sounds/massdriver.ogg differ diff --git a/core/assets/sounds/massdriverReceive.ogg b/core/assets/sounds/massdriverReceive.ogg new file mode 100644 index 0000000000..c0c40f1c04 Binary files /dev/null and b/core/assets/sounds/massdriverReceive.ogg differ diff --git a/core/assets/sounds/mechStep.ogg b/core/assets/sounds/mechStep.ogg new file mode 100644 index 0000000000..1b02d1a496 Binary files /dev/null and b/core/assets/sounds/mechStep.ogg differ diff --git a/core/assets/sounds/missile.ogg b/core/assets/sounds/missile.ogg index eb13976d87..4e94b6a34e 100644 Binary files a/core/assets/sounds/missile.ogg and b/core/assets/sounds/missile.ogg differ diff --git a/core/assets/sounds/railgun.ogg b/core/assets/sounds/railgun.ogg index d8de298916..26cb8f6da4 100644 Binary files a/core/assets/sounds/railgun.ogg and b/core/assets/sounds/railgun.ogg differ diff --git a/core/assets/sounds/shootCyclone.ogg b/core/assets/sounds/shootCyclone.ogg new file mode 100644 index 0000000000..fb38094a23 Binary files /dev/null and b/core/assets/sounds/shootCyclone.ogg differ diff --git a/core/assets/sounds/shootDuo.ogg b/core/assets/sounds/shootDuo.ogg new file mode 100644 index 0000000000..a391bce358 Binary files /dev/null and b/core/assets/sounds/shootDuo.ogg differ diff --git a/core/assets/sounds/shootFast.ogg b/core/assets/sounds/shootFast.ogg new file mode 100644 index 0000000000..3e6becc775 Binary files /dev/null and b/core/assets/sounds/shootFast.ogg differ diff --git a/core/assets/sounds/shootOmura.ogg b/core/assets/sounds/shootOmura.ogg new file mode 100644 index 0000000000..f3ed46fb55 Binary files /dev/null and b/core/assets/sounds/shootOmura.ogg differ diff --git a/core/assets/sounds/shootSpectre.ogg b/core/assets/sounds/shootSpectre.ogg new file mode 100644 index 0000000000..57fea6251b Binary files /dev/null and b/core/assets/sounds/shootSpectre.ogg differ diff --git a/core/src/mindustry/audio/SoundPriority.java b/core/src/mindustry/audio/SoundPriority.java index b67fa0b205..0d1890740b 100644 --- a/core/src/mindustry/audio/SoundPriority.java +++ b/core/src/mindustry/audio/SoundPriority.java @@ -3,7 +3,6 @@ package mindustry.audio; import arc.*; import arc.audio.*; import arc.struct.*; -import mindustry.gen.*; import static mindustry.gen.Sounds.*; @@ -36,13 +35,13 @@ public class SoundPriority{ respawning ); - //this is spammed a LOT - Sounds.shootBig.setMinConcurrentInterrupt(shootBig.getLength() * 0.9f); for(var sound : Core.assets.getAll(Sound.class, new Seq<>())){ sound.setMinConcurrentInterrupt(Math.min(0.25f, sound.getLength() * 0.5f)); - sound.setMaxConcurrent(7); } + + mechStep.setMinConcurrentInterrupt(0.3f); + mechStep.setMaxConcurrent(3); } static void set(float value, Sound... sounds){ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index ae8f695ec0..e3989ae9b8 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3290,6 +3290,7 @@ public class Blocks{ } }}; + shootSound = Sounds.shootDuo; recoil = 0.5f; shootY = 3f; reload = 20f; @@ -3792,7 +3793,7 @@ public class Blocks{ ammoUseEffect = Fx.casing2; scaledHealth = 240; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootFast; limitRange(); coolant = consumeCoolant(0.2f); @@ -3891,7 +3892,7 @@ public class Blocks{ envEnabled |= Env.space; scaledHealth = 220; - shootSound = Sounds.shotgun; + shootSound = Sounds.fuse; coolant = consumeCoolant(0.3f); float brange = range + 10f; @@ -3917,25 +3918,31 @@ public class Blocks{ ripple = new ItemTurret("ripple"){{ requirements(Category.turret, with(Items.copper, 150, Items.graphite, 135, Items.titanium, 60)); ammo( - Items.graphite, new ArtilleryBulletType(3f, 20){{ + Items.graphite, new ArtilleryBulletType(3f, 40){{ + hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller); knockback = 0.8f; lifetime = 80f; - width = height = 11f; + width = 12f; + height = 14f; collidesTiles = false; - splashDamageRadius = 25f * 0.75f; - splashDamage = 33f; + splashDamageRadius = 30f * 0.75f; + splashDamage = 70f; backColor = hitColor = trailColor = Pal.graphiteAmmoBack; frontColor = Pal.graphiteAmmoFront; despawnEffect = Fx.hitBulletColor; + lifeScaleRandMax = 1.08f; + lifeScaleRandMin = 0.95f; }}, - Items.silicon, new ArtilleryBulletType(3f, 20){{ + Items.silicon, new ArtilleryBulletType(3f, 40){{ + hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller); knockback = 0.8f; lifetime = 80f; - width = height = 11f; + width = 12f; + height = 14f; collidesTiles = false; - splashDamageRadius = 25f * 0.75f; - splashDamage = 33f; + splashDamageRadius = 30f * 0.75f; + splashDamage = 70f; reloadMultiplier = 1.2f; ammoMultiplier = 3f; homingPower = 0.08f; @@ -3947,15 +3954,18 @@ public class Blocks{ despawnEffect = Fx.hitBulletColor; backColor = hitColor = trailColor = Pal.siliconAmmoBack; frontColor = Pal.siliconAmmoFront; + lifeScaleRandMax = 1.08f; + lifeScaleRandMin = 0.95f; }}, - Items.pyratite, new ArtilleryBulletType(3f, 24){{ - hitEffect = Fx.blastExplosion; + Items.pyratite, new ArtilleryBulletType(3f, 48){{ + hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave); knockback = 0.8f; lifetime = 80f; - width = height = 13f; + width = 13f; + height = 15f; collidesTiles = false; - splashDamageRadius = 25f * 0.75f; - splashDamage = 45f; + splashDamageRadius = 30f * 0.75f; + splashDamage = 90f; status = StatusEffects.burning; statusDuration = 60f * 12f; frontColor = Pal.lightishOrange; @@ -3964,31 +3974,37 @@ public class Blocks{ trailEffect = Fx.incendTrail; ammoMultiplier = 4f; despawnEffect = Fx.hitBulletColor; + lifeScaleRandMax = 1.08f; + lifeScaleRandMin = 0.95f; }}, - Items.blastCompound, new ArtilleryBulletType(2f, 20, "shell"){{ - hitEffect = Fx.blastExplosion; + Items.blastCompound, new ArtilleryBulletType(2f, 40, "shell"){{ + hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave); knockback = 0.8f; lifetime = 80f; - width = height = 14f; + width = 14f; + height = 16f; collidesTiles = false; ammoMultiplier = 4f; - splashDamageRadius = 45f * 0.75f; - splashDamage = 55f; + splashDamageRadius = 50f * 0.75f; + splashDamage = 90f; status = StatusEffects.blasted; + lifeScaleRandMax = 1.08f; + lifeScaleRandMin = 0.95f; - despawnEffect = Fx.hitBulletColor; + despawnEffect = Fx.hitBulletColor; backColor = hitColor = trailColor = Pal.blastAmmoBack; frontColor = Pal.blastAmmoFront; }}, - Items.plastanium, new ArtilleryBulletType(3.4f, 20, "shell"){{ - hitEffect = Fx.plasticExplosion; + Items.plastanium, new ArtilleryBulletType(3.4f, 40, "shell"){{ + hitEffect = new MultiEffect(Fx.plasticExplosion, Fx.shockwave); knockback = 1f; lifetime = 80f; - width = height = 13f; + width = 13f; + height = 15f; collidesTiles = false; - splashDamageRadius = 35f * 0.75f; - splashDamage = 45f; + splashDamageRadius = 40f * 0.75f; + splashDamage = 90f; fragBullet = new BasicBulletType(2.5f, 10, "bullet"){{ width = 10f; height = 12f; @@ -4002,18 +4018,21 @@ public class Blocks{ fragBullets = 10; backColor = Pal.plastaniumBack; frontColor = Pal.plastaniumFront; + lifeScaleRandMax = 1.08f; + lifeScaleRandMin = 0.95f; }} ); targetAir = false; size = 3; shoot.shots = 4; - inaccuracy = 12f; - reload = 60f; + inaccuracy = 11f; + reload = 120f; ammoEjectBack = 5f; ammoUseEffect = Fx.casing3Double; ammoPerShot = 2; velocityRnd = 0.2f; + scaleLifetimeOffset = 1f / 9f; recoil = 6f; shake = 2f; @@ -4135,7 +4154,7 @@ public class Blocks{ rotateSpeed = 10f; inaccuracy = 10f; shootCone = 30f; - shootSound = Sounds.shootSnap; + shootSound = Sounds.shootCyclone; coolant = consumeCoolant(0.3f); scaledHealth = 145; @@ -4243,7 +4262,7 @@ public class Blocks{ shake = 2f; size = 4; shootCone = 24f; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSpectre; scaledHealth = 160; coolant = consumeCoolant(1f); diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 6ab1d3e377..1fc55671ac 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -1530,6 +1530,12 @@ public class Fx{ Lines.circle(e.x, e.y, e.fin() * 28f); }), + shockwaveSmaller = new Effect(9f, 80f, e -> { + color(Color.white, Color.lightGray, e.fin()); + stroke(e.fout() * 2f + 0.2f); + Lines.circle(e.x, e.y, e.fin() * 22f); + }), + bigShockwave = new Effect(10f, 80f, e -> { color(Color.white, Color.lightGray, e.fin()); stroke(e.fout() * 3f); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 1e67543989..f2b69b6417 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -197,6 +197,8 @@ public class UnitTypes{ stepShake = 0.15f; singleTarget = true; drownTimeMultiplier = 1.5f; + stepSound = Sounds.mechStep; + stepSoundVolume = 0.25f; abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f)); @@ -266,6 +268,7 @@ public class UnitTypes{ mechFrontSway = 1.9f; mechSideSway = 0.6f; ammoType = new ItemAmmoType(Items.thorium); + stepSound = Sounds.mechStep; weapons.add( new Weapon("reign-weapon"){{ @@ -475,6 +478,8 @@ public class UnitTypes{ immunities = ObjectSet.with(StatusEffects.burning); singleTarget = true; + stepSound = Sounds.mechStep; + stepSoundVolume = 0.25f; weapons.add(new Weapon("vela-weapon"){{ mirror = false; @@ -1813,7 +1818,7 @@ public class UnitTypes{ shake = 6f; recoil = 10.5f; shadow = 50f; - shootSound = Sounds.railgun; + shootSound = Sounds.shootOmura; ejectEffect = Fx.none; diff --git a/core/src/mindustry/entities/bullet/ArtilleryBulletType.java b/core/src/mindustry/entities/bullet/ArtilleryBulletType.java index 69e6afbd97..027899b184 100644 --- a/core/src/mindustry/entities/bullet/ArtilleryBulletType.java +++ b/core/src/mindustry/entities/bullet/ArtilleryBulletType.java @@ -14,14 +14,14 @@ public class ArtilleryBulletType extends BasicBulletType{ collidesAir = false; scaleLife = true; hitShake = 1f; - hitSound = Sounds.explosion; + hitSound = Sounds.artilleryExplosion; hitEffect = Fx.flakExplosion; shootEffect = Fx.shootBig; trailEffect = Fx.artilleryTrail; //default settings: shrinkX = 0.15f; - shrinkY = 0.63f; + shrinkY = 0.5f; shrinkInterp = Interp.slope; //for trail: diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 63a1092317..a3ce2be56b 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -80,9 +80,9 @@ public class BulletType extends Content implements Cloneable{ public Sound hitSound = Sounds.none; /** Sound made when hitting something or getting removed.*/ public Sound despawnSound = Sounds.none; - /** Pitch of the sound made when hitting something*/ - public float hitSoundPitch = 1; - /** Volume of the sound made when hitting something*/ + /** Pitch of the sound made when hitting something */ + public float hitSoundPitch = 1, hitSoundPitchRange = 0.1f; + /** Volume of the sound made when hitting something */ public float hitSoundVolume = 1; /** Extra inaccuracy when firing. */ public float inaccuracy = 0f; @@ -511,7 +511,7 @@ public class BulletType extends Content implements Cloneable{ public void hit(Bullet b, float x, float y){ hitEffect.at(x, y, b.rotation(), hitColor); - hitSound.at(x, y, hitSoundPitch, hitSoundVolume); + hitSound.at(x, y, hitSoundPitch + Mathf.range(hitSoundPitchRange), hitSoundVolume); Effect.shake(hitShake, hitShake, b); diff --git a/core/src/mindustry/entities/comp/MechComp.java b/core/src/mindustry/entities/comp/MechComp.java index eb78dd030d..e546b6c166 100644 --- a/core/src/mindustry/entities/comp/MechComp.java +++ b/core/src/mindustry/entities/comp/MechComp.java @@ -51,6 +51,7 @@ abstract class MechComp implements Posc, Hitboxc, Unitc, Mechc, ElevationMovec{ if(type.mechStepParticles){ Effect.floorDust(cx, cy, hitSize/8f); } + type.stepSound.at(cx, cy, 1f + Mathf.range(0.1f), type.stepSoundVolume); } walkExtension = extendScl; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 5139516901..2fc7618c33 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -298,6 +298,10 @@ public class UnitType extends UnlockableContent implements Senseable{ public Sound loopSound = Sounds.none; /** volume of loop sound */ public float loopSoundVolume = 0.5f; + /** sound played when this mech unit does a step */ + public Sound stepSound = Sounds.none; + /** volume of step sound */ + public float stepSoundVolume = 0.5f; /** effect that this unit emits when falling */ public Effect fallEffect = Fx.fallSmoke; /** effect created at engine when unit falls. */ diff --git a/core/src/mindustry/world/blocks/distribution/MassDriver.java b/core/src/mindustry/world/blocks/distribution/MassDriver.java index f79d55042a..9869909044 100644 --- a/core/src/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/mindustry/world/blocks/distribution/MassDriver.java @@ -36,7 +36,9 @@ public class MassDriver extends Block{ public Effect shootEffect = Fx.shootBig2; public Effect smokeEffect = Fx.shootBigSmoke2; public Effect receiveEffect = Fx.mineBig; - public Sound shootSound = Sounds.shootBig; + public Sound shootSound = Sounds.massdriver; + public Sound receiveSound = Sounds.massdriverReceive; + public float shootSoundVolume = 0.5f; public float shake = 3f; public @Load("@-base") TextureRegion baseRegion; @@ -306,7 +308,7 @@ public class MassDriver extends Block{ Effect.shake(shake, shake, this); - shootSound.at(tile, Mathf.random(0.9f, 1.1f)); + shootSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume); } public void handlePayload(Bullet bullet, DriverBulletData data){ @@ -326,6 +328,7 @@ public class MassDriver extends Block{ Effect.shake(shake, shake, this); receiveEffect.at(bullet); + receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume); reloadCounter = 1f; bullet.remove(); diff --git a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java index 5595352ab9..cfbfedf35b 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java @@ -32,7 +32,9 @@ public class PayloadMassDriver extends PayloadBlock{ public Effect shootEffect = Fx.shootBig2; public Effect smokeEffect = Fx.shootPayloadDriver; public Effect receiveEffect = Fx.payloadReceive; - public Sound shootSound = Sounds.shootBig; + public Sound shootSound = Sounds.massdriver; + public Sound receiveSound = Sounds.massdriverReceive; + public float shootSoundVolume = 0.7f; public float shake = 3f; public Effect transferEffect = new Effect(11f, 600f, e -> { @@ -176,6 +178,7 @@ public class PayloadMassDriver extends PayloadBlock{ receiveEffect.at(x - cx/2f, y - cy/2f, turretRotation); reloadCounter = 1f; Effect.shake(shake, shake, this); + receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume); } charging = false; @@ -294,7 +297,7 @@ public class PayloadMassDriver extends PayloadBlock{ smokeEffect.at(x, y, turretRotation); Effect.shake(shake, shake, this); - shootSound.at(this, Mathf.random(0.9f, 1.1f)); + shootSound.at(x, y, Mathf.random(0.9f, 1.1f), shootSoundVolume); transferEffect.at(x + cx, y + cy, turretRotation, new PayloadMassDriverData(x + cx, y + cy, other.x - cx, other.y - cy, payload)); Payload pay = payload; other.recPayload = payload; diff --git a/gradle.properties b/gradle.properties index 75a9789f5a..56a6e5090e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=9b4648505a +archash=01973bdfd5