diff --git a/core/assets-raw/sprites/units/beta.png b/core/assets-raw/sprites/units/beta.png index 5bba30659e..3a6de9a054 100644 Binary files a/core/assets-raw/sprites/units/beta.png and b/core/assets-raw/sprites/units/beta.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index fc95300e51..aed6127661 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -472,7 +472,7 @@ editor.generation = Generation editor.objectives = Objectives editor.locales = Locale Bundles editor.patches.guide = Patch Guide -editor.patches = Content Patches +editor.patches = Data Patches editor.patch: Patchset: {0} editor.patches.none = [lightgray]No patchsets loaded. editor.patches.errors = Patchset Errors diff --git a/core/assets/contributors b/core/assets/contributors index 66689d8800..0b6b9cbed0 100644 --- a/core/assets/contributors +++ b/core/assets/contributors @@ -110,6 +110,7 @@ dsmolenaers (freesound.org) Headphaze (freesound.org) Michel Baradari (opengameart.org) Michael Klier (opengameart.org) +Lee Barkovich (opengameart.org) Neoqueto (Darktech LDR Font) Nikolass VolasYouKnow diff --git a/core/assets/sounds/artillery.ogg b/core/assets/sounds/artillery.ogg index d9f8b74d75..f05e22341a 100644 Binary files a/core/assets/sounds/artillery.ogg and b/core/assets/sounds/artillery.ogg differ 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/artillerySap.ogg b/core/assets/sounds/artillerySap.ogg new file mode 100644 index 0000000000..9fbd1f4868 Binary files /dev/null and b/core/assets/sounds/artillerySap.ogg differ diff --git a/core/assets/sounds/artillerySapBig.ogg b/core/assets/sounds/artillerySapBig.ogg new file mode 100644 index 0000000000..c9c2d8e52f Binary files /dev/null and b/core/assets/sounds/artillerySapBig.ogg differ diff --git a/core/assets/sounds/artilleryShockExplosion.ogg b/core/assets/sounds/artilleryShockExplosion.ogg new file mode 100644 index 0000000000..05eecd4ef9 Binary files /dev/null and b/core/assets/sounds/artilleryShockExplosion.ogg differ diff --git a/core/assets/sounds/artilleryShockExplosionBig.ogg b/core/assets/sounds/artilleryShockExplosionBig.ogg new file mode 100644 index 0000000000..5a7276e541 Binary files /dev/null and b/core/assets/sounds/artilleryShockExplosionBig.ogg differ diff --git a/core/assets/sounds/artillerySmall.ogg b/core/assets/sounds/artillerySmall.ogg new file mode 100644 index 0000000000..b85fac740c Binary files /dev/null and b/core/assets/sounds/artillerySmall.ogg differ diff --git a/core/assets/sounds/bang.ogg b/core/assets/sounds/bang.ogg index 29cde62552..7d52c9208b 100644 Binary files a/core/assets/sounds/bang.ogg and b/core/assets/sounds/bang.ogg differ diff --git a/core/assets/sounds/beamPlasma.ogg b/core/assets/sounds/beamPlasma.ogg new file mode 100644 index 0000000000..d61646500b Binary files /dev/null and b/core/assets/sounds/beamPlasma.ogg differ diff --git a/core/assets/sounds/beamPlasmaFire.ogg b/core/assets/sounds/beamPlasmaFire.ogg new file mode 100644 index 0000000000..f5be071392 Binary files /dev/null and b/core/assets/sounds/beamPlasmaFire.ogg differ diff --git a/core/assets/sounds/beamPlasmaFireSmall.ogg b/core/assets/sounds/beamPlasmaFireSmall.ogg new file mode 100644 index 0000000000..be54b72bc1 Binary files /dev/null and b/core/assets/sounds/beamPlasmaFireSmall.ogg differ diff --git a/core/assets/sounds/beamPlasmaSmall.ogg b/core/assets/sounds/beamPlasmaSmall.ogg new file mode 100644 index 0000000000..2cbb7846bc Binary files /dev/null and b/core/assets/sounds/beamPlasmaSmall.ogg differ diff --git a/core/assets/sounds/bigshot.ogg b/core/assets/sounds/bigshot.ogg deleted file mode 100644 index 3218eec651..0000000000 Binary files a/core/assets/sounds/bigshot.ogg and /dev/null differ diff --git a/core/assets/sounds/bombDrop.ogg b/core/assets/sounds/bombDrop.ogg new file mode 100644 index 0000000000..a724d6a74a Binary files /dev/null and b/core/assets/sounds/bombDrop.ogg differ diff --git a/core/assets/sounds/corexplode.ogg b/core/assets/sounds/corexplode.ogg deleted file mode 100644 index b26ff4a64c..0000000000 Binary files a/core/assets/sounds/corexplode.ogg and /dev/null differ diff --git a/core/assets/sounds/crawlerExplosion.ogg b/core/assets/sounds/crawlerExplosion.ogg new file mode 100644 index 0000000000..dd0321779d Binary files /dev/null and b/core/assets/sounds/crawlerExplosion.ogg differ diff --git a/core/assets/sounds/drill.ogg b/core/assets/sounds/drill.ogg index ea75df8198..8cd7c92dab 100644 Binary files a/core/assets/sounds/drill.ogg and b/core/assets/sounds/drill.ogg differ diff --git a/core/assets/sounds/dullExplosion.ogg b/core/assets/sounds/dullExplosion.ogg index 37eb43c3a3..b3d8b41686 100644 Binary files a/core/assets/sounds/dullExplosion.ogg and b/core/assets/sounds/dullExplosion.ogg differ diff --git a/core/assets/sounds/empBlast.ogg b/core/assets/sounds/empBlast.ogg new file mode 100644 index 0000000000..08167aff69 Binary files /dev/null and b/core/assets/sounds/empBlast.ogg differ diff --git a/core/assets/sounds/explosion.ogg b/core/assets/sounds/explosion.ogg index 5f4a69281d..72c11890a9 100644 Binary files a/core/assets/sounds/explosion.ogg and b/core/assets/sounds/explosion.ogg differ diff --git a/core/assets/sounds/explosionPlasmaSmall.ogg b/core/assets/sounds/explosionPlasmaSmall.ogg new file mode 100644 index 0000000000..85704dfd3c Binary files /dev/null and b/core/assets/sounds/explosionPlasmaSmall.ogg differ diff --git a/core/assets/sounds/flame.ogg b/core/assets/sounds/flame.ogg index ef203e0524..bfd1b06b3f 100644 Binary files a/core/assets/sounds/flame.ogg and b/core/assets/sounds/flame.ogg differ diff --git a/core/assets/sounds/flame2.ogg b/core/assets/sounds/flame2.ogg deleted file mode 100644 index 812774a6e6..0000000000 Binary files a/core/assets/sounds/flame2.ogg and /dev/null differ diff --git a/core/assets/sounds/flamePlasma.ogg b/core/assets/sounds/flamePlasma.ogg new file mode 100644 index 0000000000..bd5004c9ac Binary files /dev/null and b/core/assets/sounds/flamePlasma.ogg differ diff --git a/core/assets/sounds/laser.ogg b/core/assets/sounds/laser.ogg index 3a727c5053..8cedadca2d 100644 Binary files a/core/assets/sounds/laser.ogg and b/core/assets/sounds/laser.ogg differ diff --git a/core/assets/sounds/laser2.ogg b/core/assets/sounds/laser2.ogg new file mode 100644 index 0000000000..88c9a1e185 Binary files /dev/null and b/core/assets/sounds/laser2.ogg differ diff --git a/core/assets/sounds/lasercharge2.ogg b/core/assets/sounds/lasercharge2.ogg index 2a737e5f63..1061fe6284 100644 Binary files a/core/assets/sounds/lasercharge2.ogg and b/core/assets/sounds/lasercharge2.ogg differ diff --git a/core/assets/sounds/lasercharge3.ogg b/core/assets/sounds/lasercharge3.ogg new file mode 100644 index 0000000000..50ff067f8b Binary files /dev/null and b/core/assets/sounds/lasercharge3.ogg differ diff --git a/core/assets/sounds/lasershoot.ogg b/core/assets/sounds/lasershoot.ogg index d25c17a4cb..a29d5fdb16 100644 Binary files a/core/assets/sounds/lasershoot.ogg and b/core/assets/sounds/lasershoot.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..3de7284a46 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..be57a5d7e0 100644 Binary files a/core/assets/sounds/missile.ogg and b/core/assets/sounds/missile.ogg differ diff --git a/core/assets/sounds/missileLong.ogg b/core/assets/sounds/missileLong.ogg new file mode 100644 index 0000000000..50bcbb0aed Binary files /dev/null and b/core/assets/sounds/missileLong.ogg differ diff --git a/core/assets/sounds/missilePlasma.ogg b/core/assets/sounds/missilePlasma.ogg new file mode 100644 index 0000000000..3f36631eaa Binary files /dev/null and b/core/assets/sounds/missilePlasma.ogg differ diff --git a/core/assets/sounds/missilePlasmaShort.ogg b/core/assets/sounds/missilePlasmaShort.ogg new file mode 100644 index 0000000000..280b5000e3 Binary files /dev/null and b/core/assets/sounds/missilePlasmaShort.ogg differ diff --git a/core/assets/sounds/missileShort.ogg b/core/assets/sounds/missileShort.ogg new file mode 100644 index 0000000000..befd43d49d Binary files /dev/null and b/core/assets/sounds/missileShort.ogg differ diff --git a/core/assets/sounds/padLand.ogg b/core/assets/sounds/padLand.ogg new file mode 100644 index 0000000000..067cdf0732 Binary files /dev/null and b/core/assets/sounds/padLand.ogg differ diff --git a/core/assets/sounds/padLaunch.ogg b/core/assets/sounds/padLaunch.ogg new file mode 100644 index 0000000000..b6ca9d8566 Binary files /dev/null and b/core/assets/sounds/padLaunch.ogg differ diff --git a/core/assets/sounds/railgun.ogg b/core/assets/sounds/railgun.ogg index d8de298916..bc279cfec3 100644 Binary files a/core/assets/sounds/railgun.ogg and b/core/assets/sounds/railgun.ogg differ diff --git a/core/assets/sounds/reactorExplosion.ogg b/core/assets/sounds/reactorExplosion.ogg new file mode 100644 index 0000000000..d933140a38 Binary files /dev/null and b/core/assets/sounds/reactorExplosion.ogg differ diff --git a/core/assets/sounds/sap.ogg b/core/assets/sounds/sap.ogg index 9e73a8d516..702adccd07 100644 Binary files a/core/assets/sounds/sap.ogg and b/core/assets/sounds/sap.ogg differ diff --git a/core/assets/sounds/shock.ogg b/core/assets/sounds/shock.ogg new file mode 100644 index 0000000000..09156f4e45 Binary files /dev/null and b/core/assets/sounds/shock.ogg differ diff --git a/core/assets/sounds/shootAltLong.ogg b/core/assets/sounds/shootAltLong.ogg index f0936a6683..0ce2dbb719 100644 Binary files a/core/assets/sounds/shootAltLong.ogg and b/core/assets/sounds/shootAltLong.ogg differ diff --git a/core/assets/sounds/shootAtrax.ogg b/core/assets/sounds/shootAtrax.ogg new file mode 100644 index 0000000000..303fbd6027 Binary files /dev/null and b/core/assets/sounds/shootAtrax.ogg differ diff --git a/core/assets/sounds/shootCyclone.ogg b/core/assets/sounds/shootCyclone.ogg new file mode 100644 index 0000000000..1d497dfc73 Binary files /dev/null and b/core/assets/sounds/shootCyclone.ogg differ diff --git a/core/assets/sounds/shootDagger.ogg b/core/assets/sounds/shootDagger.ogg new file mode 100644 index 0000000000..475dfa824c Binary files /dev/null and b/core/assets/sounds/shootDagger.ogg differ diff --git a/core/assets/sounds/shootDuo.ogg b/core/assets/sounds/shootDuo.ogg new file mode 100644 index 0000000000..16af816ee7 Binary files /dev/null and b/core/assets/sounds/shootDuo.ogg differ diff --git a/core/assets/sounds/shootNavanax.ogg b/core/assets/sounds/shootNavanax.ogg new file mode 100644 index 0000000000..f76458f073 Binary files /dev/null and b/core/assets/sounds/shootNavanax.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/shootReign.ogg b/core/assets/sounds/shootReign.ogg new file mode 100644 index 0000000000..46aa4f4db1 Binary files /dev/null and b/core/assets/sounds/shootReign.ogg differ diff --git a/core/assets/sounds/shootRipple.ogg b/core/assets/sounds/shootRipple.ogg new file mode 100644 index 0000000000..fba422e572 Binary files /dev/null and b/core/assets/sounds/shootRipple.ogg differ diff --git a/core/assets/sounds/shootSalvo.ogg b/core/assets/sounds/shootSalvo.ogg new file mode 100644 index 0000000000..18590a6362 Binary files /dev/null and b/core/assets/sounds/shootSalvo.ogg differ diff --git a/core/assets/sounds/shootScepter.ogg b/core/assets/sounds/shootScepter.ogg new file mode 100644 index 0000000000..3a0690b6ad Binary files /dev/null and b/core/assets/sounds/shootScepter.ogg differ diff --git a/core/assets/sounds/shootSegment.ogg b/core/assets/sounds/shootSegment.ogg new file mode 100644 index 0000000000..38474e2e62 Binary files /dev/null and b/core/assets/sounds/shootSegment.ogg differ diff --git a/core/assets/sounds/shootSnap.ogg b/core/assets/sounds/shootSnap.ogg index 17826bb5c0..4ea257ecba 100644 Binary files a/core/assets/sounds/shootSnap.ogg and b/core/assets/sounds/shootSnap.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/assets/sounds/shootStell.ogg b/core/assets/sounds/shootStell.ogg new file mode 100644 index 0000000000..f65d486037 Binary files /dev/null and b/core/assets/sounds/shootStell.ogg differ diff --git a/core/assets/sounds/shotgunSap.ogg b/core/assets/sounds/shotgunSap.ogg new file mode 100644 index 0000000000..4601ef6d37 Binary files /dev/null and b/core/assets/sounds/shotgunSap.ogg differ diff --git a/core/assets/sounds/spark.ogg b/core/assets/sounds/spark.ogg index 352e98c743..be6df78b77 100644 Binary files a/core/assets/sounds/spark.ogg and b/core/assets/sounds/spark.ogg differ diff --git a/core/assets/sounds/sparkBullet.ogg b/core/assets/sounds/sparkBullet.ogg new file mode 100644 index 0000000000..025799eebe Binary files /dev/null and b/core/assets/sounds/sparkBullet.ogg differ diff --git a/core/assets/sounds/walkerStep.ogg b/core/assets/sounds/walkerStep.ogg new file mode 100644 index 0000000000..877b97b7b9 Binary files /dev/null and b/core/assets/sounds/walkerStep.ogg differ diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index 1bf6b45c99..c0b52edf8a 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -270,7 +270,6 @@ public class CommandAI extends AIController{ Building targetBuild = world.buildWorld(targetPos.x, targetPos.y); - //TODO: should the unit stop when it finds a target? if( (hasStance(UnitStance.patrol) && !hasStance(UnitStance.pursueTarget) && target != null && unit.within(target, unit.type.range - 2f) && !unit.type.circleTarget) || @@ -347,7 +346,7 @@ public class CommandAI extends AIController{ if(move){ if(unit.type.circleTarget && attackTarget != null){ target = attackTarget; - circleAttack(80f); + circleAttack(unit.type.circleTargetRadius); }else{ moveTo(vecOut, withinAttackRange ? engageRange : @@ -362,7 +361,7 @@ public class CommandAI extends AIController{ attackTarget = null; } - if(unit.isFlying() && move && (attackTarget == null || !unit.within(attackTarget, unit.type.range))){ + if(unit.isFlying() && move && !(unit.type.circleTarget && !unit.type.omniMovement) && (attackTarget == null || !unit.within(attackTarget, unit.type.range))){ unit.lookAt(vecMovePos); }else{ faceTarget(); @@ -379,7 +378,11 @@ public class CommandAI extends AIController{ } }else if(target != null){ - faceTarget(); + if(unit.type.circleTarget && shouldFire()){ + circleAttack(unit.type.circleTargetRadius); + }else{ + faceTarget(); + } } } diff --git a/core/src/mindustry/ai/types/FlyingAI.java b/core/src/mindustry/ai/types/FlyingAI.java index c328b41b41..3122a56951 100644 --- a/core/src/mindustry/ai/types/FlyingAI.java +++ b/core/src/mindustry/ai/types/FlyingAI.java @@ -19,7 +19,7 @@ public class FlyingAI extends AIController{ if(target != null && unit.hasWeapons()){ if(unit.type.circleTarget){ - circleAttack(120f); + circleAttack(unit.type.circleTargetRadius); }else{ moveTo(target, unit.type.range * 0.8f); unit.lookAt(target); diff --git a/core/src/mindustry/ai/types/RepairAI.java b/core/src/mindustry/ai/types/RepairAI.java index af0140eaba..bf3e9782ff 100644 --- a/core/src/mindustry/ai/types/RepairAI.java +++ b/core/src/mindustry/ai/types/RepairAI.java @@ -30,7 +30,7 @@ public class RepairAI extends AIController{ if(target != null && target instanceof Building b && b.team == unit.team){ if(unit.type.circleTarget){ - circleAttack(120f); + circleAttack(unit.type.circleTargetRadius); }else if(!target.within(unit, unit.type.range * 0.65f)){ moveTo(target, unit.type.range * 0.65f); } diff --git a/core/src/mindustry/audio/SoundPriority.java b/core/src/mindustry/audio/SoundPriority.java index b67fa0b205..0c85722278 100644 --- a/core/src/mindustry/audio/SoundPriority.java +++ b/core/src/mindustry/audio/SoundPriority.java @@ -3,25 +3,33 @@ package mindustry.audio; import arc.*; import arc.audio.*; import arc.struct.*; -import mindustry.gen.*; import static mindustry.gen.Sounds.*; /** Sets up priorities and groups for various sounds. */ public class SoundPriority{ + static int lastGroup = 1; public static void init(){ + max(7, laserbig, beam, laserbeam); + //priority 2: long weapon loops set( 2f, laserbig, - beam + beam, + laserbeam, + beamPlasma ); //priority 1.5: big weapon sounds, not loops - set(1.5f, + set( + 1.5f, railgun, - largeCannon + largeCannon, + lasercharge, + lasercharge2, + lasercharge3 ); //priority 1: ambient noises @@ -36,13 +44,35 @@ public class SoundPriority{ respawning ); - //this is spammed a LOT - Sounds.shootBig.setMinConcurrentInterrupt(shootBig.getLength() * 0.9f); + //very loud + laser.setMaxConcurrent(5); + + sameGroup(flame, flamePlasma); + + //sameGroup(hit1, hit2, hit3); + //max(4, hit1, hit2, hit3); + + sameGroup(missile, missileShort, missilePlasmaShort); + sameGroup(spark, shock); 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.5f); + walkerStep.setMinConcurrentInterrupt(0.6f); + + mechStep.setMaxConcurrent(4); + walkerStep.setMaxConcurrent(4); + } + + static void max(int max, Sound... sounds){ + for(var s : sounds) s.setMaxConcurrent(max); + } + + static void sameGroup(Sound... sounds){ + int id = lastGroup ++; + for(var s : sounds) s.setConcurrentGroup(id); } static void set(float value, Sound... sounds){ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index df1dc5333e..930675c138 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3298,6 +3298,7 @@ public class Blocks{ } }}; + shootSound = Sounds.shootDuo; recoil = 0.5f; shootY = 3f; reload = 20f; @@ -3501,7 +3502,7 @@ public class Blocks{ inaccuracy = 1f; shootCone = 10f; health = 260; - shootSound = Sounds.bang; + shootSound = Sounds.artillerySmall; coolant = consumeCoolant(0.1f); limitRange(0f); }}; @@ -3538,7 +3539,6 @@ public class Blocks{ flags = EnumSet.of(BlockFlag.turret, BlockFlag.extinguisher); }}; - //TODO these may work in space, but what's the point? lancer = new PowerTurret("lancer"){{ requirements(Category.turret, with(Items.copper, 60, Items.lead, 70, Items.silicon, 60, Items.titanium, 30)); range = 165f; @@ -3558,6 +3558,7 @@ public class Blocks{ accurateDelay = false; shootSound = Sounds.laser; coolant = consumeCoolant(0.2f); + chargeSound = Sounds.lasercharge3; consumePower(6f); @@ -3800,7 +3801,7 @@ public class Blocks{ ammoUseEffect = Fx.casing2; scaledHealth = 240; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSalvo; limitRange(); coolant = consumeCoolant(0.2f); @@ -3835,7 +3836,7 @@ public class Blocks{ damage = 0.2f; layer = Layer.bullet - 2f; }}, - Liquids.slag, new LiquidBulletType(Liquids.slag){{ + Liquids.slag, new LiquidBulletType(Liquids.slag){{ lifetime = 49f; speed = 4f; knockback = 1.3f; @@ -3900,6 +3901,7 @@ public class Blocks{ scaledHealth = 220; shootSound = Sounds.shotgun; + shootSoundVolume = 0.9f; coolant = consumeCoolant(0.3f); float brange = range + 10f; @@ -3925,25 +3927,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; @@ -3955,15 +3963,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; @@ -3972,32 +3983,38 @@ 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; - fragBullet = new BasicBulletType(2.5f, 10, "bullet"){{ + splashDamageRadius = 40f * 0.75f; + splashDamage = 90f; + fragBullet = new BasicBulletType(2.5f, 14, "bullet"){{ width = 10f; height = 12f; shrinkY = 1f; @@ -4007,21 +4024,24 @@ public class Blocks{ despawnEffect = Fx.none; collidesAir = false; }}; - fragBullets = 10; + fragBullets = 15; 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; @@ -4030,7 +4050,7 @@ public class Blocks{ coolant = consumeCoolant(0.3f); scaledHealth = 130; - shootSound = Sounds.artillery; + shootSound = Sounds.shootRipple; }}; cyclone = new ItemTurret("cyclone"){{ @@ -4143,7 +4163,7 @@ public class Blocks{ rotateSpeed = 10f; inaccuracy = 10f; shootCone = 30f; - shootSound = Sounds.shootSnap; + shootSound = Sounds.shootCyclone; coolant = consumeCoolant(0.3f); scaledHealth = 145; @@ -4251,7 +4271,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..b1ff7d79a3 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); @@ -2017,18 +2023,18 @@ public class Fx{ shootSmallFlame = new Effect(32f, 80f, e -> { color(Pal.lightFlame, Pal.darkFlame, Color.gray, e.fin()); - randLenVectors(e.id, 8, e.finpow() * 60f, e.rotation, 10f, (x, y) -> { + randLenVectors(e.id, 12, e.finpow() * 60f, e.rotation, 10f, (x, y) -> { Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f); }); - }), + }).followParent(false), shootPyraFlame = new Effect(33f, 80f, e -> { color(Pal.lightPyraFlame, Pal.darkPyraFlame, Color.gray, e.fin()); - randLenVectors(e.id, 10, e.finpow() * 70f, e.rotation, 10f, (x, y) -> { + randLenVectors(e.id, 13, e.finpow() * 70f, e.rotation, 10f, (x, y) -> { Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.6f); }); - }), + }).followParent(false), shootLiquid = new Effect(15f, 80f, e -> { color(e.color); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 1e67543989..bd1bb9b715 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -103,6 +103,7 @@ public class UnitTypes{ hitSize = 8f; health = 150; weapons.add(new Weapon("large-weapon"){{ + shootSound = Sounds.shootDagger; reload = 13f; x = 4f; y = 2f; @@ -122,24 +123,23 @@ public class UnitTypes{ health = 550; armor = 4f; ammoType = new ItemAmmoType(Items.coal); - immunities.add(StatusEffects.burning); weapons.add(new Weapon("flamethrower"){{ top = false; shootSound = Sounds.flame; shootY = 2f; - reload = 11f; + reload = 22f; recoil = 1f; ejectEffect = Fx.none; - bullet = new BulletType(4.2f, 37f){{ + bullet = new BulletType(4.2f, 37f*2f){{ ammoMultiplier = 3f; hitSize = 7f; lifetime = 13f; pierce = true; pierceBuilding = true; pierceCap = 2; - statusDuration = 60f * 4; + statusDuration = 60f * 5; shootEffect = Fx.shootSmallFlame; hitEffect = Fx.hitFlameSmall; despawnEffect = Fx.none; @@ -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)); @@ -216,7 +218,7 @@ public class UnitTypes{ recoil = 5f; shake = 2f; ejectEffect = Fx.casing3; - shootSound = Sounds.bang; + shootSound = Sounds.shootScepter; inaccuracy = 3f; shoot.shots = 3; @@ -232,6 +234,7 @@ public class UnitTypes{ lightningColor = Pal.surge; //standard bullet damage is far too much for lightning lightningDamage = 20; + despawnSound = Sounds.sparkBullet; }}; }}, @@ -242,6 +245,7 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootDagger; }}, new Weapon("mount-weapon"){{ reload = 16f; @@ -250,6 +254,7 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootDagger; }} ); }}; @@ -266,6 +271,7 @@ public class UnitTypes{ mechFrontSway = 1.9f; mechSideSway = 0.6f; ammoType = new ItemAmmoType(Items.thorium); + stepSound = Sounds.mechStep; weapons.add( new Weapon("reign-weapon"){{ @@ -277,7 +283,7 @@ public class UnitTypes{ recoil = 5f; shake = 2f; ejectEffect = Fx.casing4; - shootSound = Sounds.bang; + shootSound = Sounds.shootReign; bullet = new BasicBulletType(13f, 80){{ pierce = true; @@ -295,6 +301,7 @@ public class UnitTypes{ fragBullets = 3; fragLifeMin = 0f; fragRandomSpread = 30f; + despawnSound = Sounds.explosion; fragBullet = new BasicBulletType(9f, 20){{ width = 10f; @@ -380,7 +387,7 @@ public class UnitTypes{ ejectEffect = Fx.none; recoil = 2.5f; - shootSound = Sounds.spark; + shootSound = Sounds.shock; bullet = new LightningBulletType(){{ lightningColor = hitColor = Pal.heal; @@ -475,6 +482,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; @@ -489,7 +498,8 @@ public class UnitTypes{ reload = 155f; recoil = 0f; chargeSound = Sounds.lasercharge2; - shootSound = Sounds.beam; + shootSound = Sounds.beamPlasma; + initialShootSound = Sounds.beamPlasmaFire; continuous = true; cooldownTime = 200f; @@ -541,6 +551,10 @@ public class UnitTypes{ rotateSpeed = 1.5f; drownTimeMultiplier = 1.6f; + stepSound = Sounds.walkerStep; + stepSoundVolume = 1.1f; + stepSoundPitch = 0.9f; + legCount = 4; legLength = 14f; legBaseOffset = 11f; @@ -623,13 +637,13 @@ public class UnitTypes{ reload = 24f; shootCone = 180f; ejectEffect = Fx.none; - shootSound = Sounds.explosion; + shootSound = Sounds.crawlerExplosion; + shootSoundVolume = 0.4f; x = shootY = 0f; mirror = false; bullet = new BulletType(){{ collidesTiles = false; collides = false; - hitSound = Sounds.explosion; rangeOverride = 25f; hitEffect = Fx.pulverize; @@ -671,7 +685,7 @@ public class UnitTypes{ ejectEffect = Fx.none; recoil = 1f; x = 7f; - shootSound = Sounds.flame; + shootSound = Sounds.shootAtrax; bullet = new LiquidBulletType(Liquids.slag){{ damage = 13; @@ -768,6 +782,10 @@ public class UnitTypes{ legSpeed = 0.2f; ammoType = new PowerAmmoType(2000); + stepSound = Sounds.walkerStep; + stepSoundVolume = 0.75f; + stepSoundPitch = 1.1f; + legSplashDamage = 32; legSplashRange = 30; @@ -820,13 +838,14 @@ public class UnitTypes{ shake = 3f; rotateSpeed = 2f; ejectEffect = Fx.casing1; - shootSound = Sounds.artillery; + shootSound = Sounds.artillerySap; rotate = true; shadow = 8f; recoil = 3f; bullet = new ArtilleryBulletType(2f, 12){{ hitEffect = Fx.sapExplosion; + despawnSound = Sounds.artilleryShockExplosion; knockback = 0.8f; lifetime = 70f; width = height = 19f; @@ -854,6 +873,8 @@ public class UnitTypes{ health = 22000; armor = 13f; lightRadius = 140f; + stepSound = Sounds.walkerStep; + stepSoundVolume = 1.1f; rotateSpeed = 1.9f; @@ -885,7 +906,8 @@ public class UnitTypes{ shake = 4f; rotateSpeed = 2f; ejectEffect = Fx.casing1; - shootSound = Sounds.shootBig; + shootSound = Sounds.shotgunSap; + shootSoundVolume = 0.8f; rotate = true; shadow = 12f; recoil = 3f; @@ -917,13 +939,14 @@ public class UnitTypes{ recoil = 10f; rotateSpeed = 1f; ejectEffect = Fx.casing3; - shootSound = Sounds.artillery; + shootSound = Sounds.artillerySapBig; rotate = true; shadow = 30f; rotationLimit = 80f; bullet = new ArtilleryBulletType(3f, 50){{ + despawnSound = Sounds.artilleryShockExplosionBig; hitEffect = Fx.sapExplosion; knockback = 0.8f; lifetime = 80f; @@ -949,6 +972,7 @@ public class UnitTypes{ fragBullets = 9; fragBullet = new ArtilleryBulletType(2.3f, 30){{ + despawnSound = Sounds.artilleryShockExplosion; hitEffect = Fx.sapExplosion; knockback = 0.8f; lifetime = 90f; @@ -984,18 +1008,25 @@ public class UnitTypes{ flying = true; health = 70; engineOffset = 5.75f; - //TODO balance - //targetAir = false; targetFlags = new BlockFlag[]{BlockFlag.generator, null}; hitSize = 9; itemCapacity = 10; + circleTarget = true; + omniMovement = false; + rotateSpeed = 5f; + circleTargetRadius = 60f; weapons.add(new Weapon(){{ - y = 0f; - x = 2f; - reload = 20f; + y = 1f; + x = 0f; + minShootVelocity = 2f; + shootCone = 10f; + reload = 80f; + shoot.shots = 3; + shoot.shotDelay = 3f; ejectEffect = Fx.casing1; - bullet = new BasicBulletType(2.5f, 9){{ + mirror = false; + bullet = new BasicBulletType(2.5f, 16){{ width = 7f; height = 9f; lifetime = 45f; @@ -1003,7 +1034,7 @@ public class UnitTypes{ smokeEffect = Fx.shootSmallSmoke; ammoMultiplier = 2; }}; - shootSound = Sounds.pew; + shootSound = Sounds.shootDagger; }}); }}; @@ -1024,9 +1055,12 @@ public class UnitTypes{ targetFlags = new BlockFlag[]{BlockFlag.factory, null}; circleTarget = true; ammoType = new ItemAmmoType(Items.graphite); + omniMovement = false; + rotateSpeed = 4.5f; + circleTargetRadius = 40f; weapons.add(new Weapon(){{ - minShootVelocity = 0.75f; + minShootVelocity = 1f; x = 3f; shootY = 0f; reload = 12f; @@ -1034,7 +1068,8 @@ public class UnitTypes{ ejectEffect = Fx.none; inaccuracy = 15f; ignoreRotation = true; - shootSound = Sounds.none; + shootSound = Sounds.bombDrop; + soundPitchMax = 1.2f; bullet = new BombBulletType(27f, 25f){{ width = 10f; height = 14f; @@ -1074,7 +1109,7 @@ public class UnitTypes{ shoot.shots = 2; inaccuracy = 5f; velocityRnd = 0.2f; - shootSound = Sounds.missile; + shootSound = Sounds.missileLong; bullet = new MissileBulletType(3f, 14){{ width = 8f; @@ -1159,7 +1194,7 @@ public class UnitTypes{ shake = 1f; rotateSpeed = 2f; ejectEffect = Fx.casing1; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSpectre; rotate = true; shadow = 8f; bullet = new BasicBulletType(7f, 55){{ @@ -1208,7 +1243,7 @@ public class UnitTypes{ rotateSpeed = 2f; reload = 45f; recoil = 4f; - shootSound = Sounds.laser; + shootSound = Sounds.laser2; shadow = 20f; rotate = true; @@ -1228,7 +1263,7 @@ public class UnitTypes{ y = 27f; rotateSpeed = 2f; reload = 9f; - shootSound = Sounds.shoot; + shootSound = Sounds.shootCyclone; shadow = 7f; rotate = true; recoil = 0.5f; @@ -1242,7 +1277,7 @@ public class UnitTypes{ ejectEffect = Fx.casing1; rotateSpeed = 7f; shake = 1f; - shootSound = Sounds.shoot; + shootSound = Sounds.shootCyclone; rotate = true; shadow = 12f; shootY = 7.25f; @@ -1301,7 +1336,7 @@ public class UnitTypes{ reload = 30f; ejectEffect = Fx.none; recoil = 2f; - shootSound = Sounds.missile; + shootSound = Sounds.missilePlasmaShort; velocityRnd = 0.5f; inaccuracy = 15f; alternate = true; @@ -1498,6 +1533,7 @@ public class UnitTypes{ y = 1.5f; rotate = true; ejectEffect = Fx.casing1; + shootSound = Sounds.shootDagger; bullet = new BasicBulletType(2.5f, 9){{ width = 7f; height = 9f; @@ -1513,7 +1549,7 @@ public class UnitTypes{ y = -5f; rotate = true; ejectEffect = Fx.casing1; - shootSound = Sounds.missile; + shootSound = Sounds.missileShort; bullet = new MissileBulletType(2.7f, 12, "missile"){{ keepVelocity = true; width = 8f; @@ -1559,7 +1595,7 @@ public class UnitTypes{ rotateSpeed = 5f; inaccuracy = 8f; ejectEffect = Fx.casing1; - shootSound = Sounds.shoot; + shootSound = Sounds.shootDuo; bullet = new FlakBulletType(4.2f, 3){{ lifetime = 60f; ammoMultiplier = 4f; @@ -1581,7 +1617,7 @@ public class UnitTypes{ rotateSpeed = 2f; shake = 1.5f; ejectEffect = Fx.casing2; - shootSound = Sounds.bang; + shootSound = Sounds.artillerySmall; bullet = new ArtilleryBulletType(3f, 20, "shell"){{ hitEffect = Fx.flakExplosion; knockback = 0.8f; @@ -1665,7 +1701,7 @@ public class UnitTypes{ inaccuracy = 5f; velocityRnd = 0.1f; - shootSound = Sounds.missile; + shootSound = Sounds.missileShort; ammoType = new ItemAmmoType(Items.thorium); ejectEffect = Fx.none; @@ -1724,7 +1760,7 @@ public class UnitTypes{ inaccuracy = 7f; ejectEffect = Fx.none; shake = 1f; - shootSound = Sounds.missile; + shootSound = Sounds.missileLong; shoot = new ShootAlternate(){{ shots = 6; @@ -1766,7 +1802,7 @@ public class UnitTypes{ recoil = 3f; shadow = 12f; ejectEffect = Fx.casing3; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSpectre; shoot.shots = 3; shoot.shotDelay = 4f; @@ -1792,10 +1828,6 @@ public class UnitTypes{ faceTarget = false; ammoType = new PowerAmmoType(4000); - float spawnTime = 60f * 15f; - - abilities.add(new UnitSpawnAbility(flare, spawnTime, 19.25f, -31.75f), new UnitSpawnAbility(flare, spawnTime, -19.25f, -31.75f)); - trailLength = 70; waveTrailX = 23f; waveTrailY = -32f; @@ -1813,7 +1845,7 @@ public class UnitTypes{ shake = 6f; recoil = 10.5f; shadow = 50f; - shootSound = Sounds.railgun; + shootSound = Sounds.shootOmura; ejectEffect = Fx.none; @@ -1886,8 +1918,9 @@ public class UnitTypes{ rotate = true; reload = 90f; x = y = shootX = shootY = 0f; - shootSound = Sounds.mineDeploy; + shootSound = Sounds.missilePlasmaShort; rotateSpeed = 180f; + shootSoundVolume = 0.9f; shoot.shots = 3; shoot.shotDelay = 7f; @@ -1906,7 +1939,7 @@ public class UnitTypes{ frontColor = Color.white; mixColorTo = Color.white; - hitSound = Sounds.plasmaboom; + hitSound = Sounds.explosionPlasmaSmall; underwater = true; ejectEffect = Fx.none; @@ -1968,7 +2001,8 @@ public class UnitTypes{ rotateSpeed = 5f; inaccuracy = 10f; ejectEffect = Fx.casing1; - shootSound = Sounds.flame; + shootSound = Sounds.flamePlasma; + shootSoundVolume = 0.9f; shootCone = 30f; bullet = new BulletType(3.4f, 23f){{ @@ -2057,7 +2091,7 @@ public class UnitTypes{ rotate = true; inaccuracy = 1f; velocityRnd = 0.1f; - shootSound = Sounds.missile; + shootSound = Sounds.missilePlasma; ejectEffect = Fx.none; bullet = new FlakBulletType(2.5f, 25){{ @@ -2073,6 +2107,7 @@ public class UnitTypes{ lightRadius = 60f; lightOpacity = 0.7f; lightColor = Pal.heal; + despawnSound = Sounds.explosion; splashDamageRadius = 30f; splashDamage = 25f; @@ -2240,7 +2275,8 @@ public class UnitTypes{ rotateSpeed = 3.5f; reload = 170f; recoil = 1f; - shootSound = Sounds.beam; + shootSound = Sounds.beamPlasmaSmall; + initialShootSound = Sounds.beamPlasmaFireSmall; continuous = true; cooldownTime = reload; immunities.add(StatusEffects.burning); @@ -2291,8 +2327,7 @@ public class UnitTypes{ shootY = 7f; recoil = 4f; cooldownTime = reload - 10f; - //TODO better sound - shootSound = Sounds.laser; + shootSound = Sounds.shootNavanax; bullet = new EmpBulletType(){{ float rad = 100f; @@ -2326,7 +2361,7 @@ public class UnitTypes{ hitShake = 4f; trailRotation = true; status = StatusEffects.electrified; - hitSound = Sounds.plasmaboom; + hitSound = Sounds.empBlast; trailEffect = new Effect(16f, e -> { color(Pal.heal); @@ -2431,15 +2466,14 @@ public class UnitTypes{ health = 170f; engineOffset = 6f; hitSize = 9f; - faceTarget = false; lowAltitude = true; weapons.add(new Weapon("small-mount-weapon"){{ top = false; reload = 20f; x = 3f; - y = 0.5f; - rotate = true; + y = 1f; + recoil = 1f; shoot.shots = 2; shoot.shotDelay = 4f; @@ -2533,6 +2567,7 @@ public class UnitTypes{ researchCostMultiplier = 0f; weapons.add(new Weapon("stell-weapon"){{ + shootSound = Sounds.shootStell; layerOffset = 0.0001f; reload = 50f; shootY = 4.5f; @@ -2797,6 +2832,7 @@ public class UnitTypes{ recoil = 2f; rotate = true; rotateSpeed = 2f; + shootSound = Sounds.shootStell; bullet = new BasicBulletType(4.5f, 25){{ width = 6.5f; @@ -3349,6 +3385,10 @@ public class UnitTypes{ legMaxLength = 1.3f; researchCostMultiplier = 0f; + stepSound = Sounds.walkerStep; + stepSoundVolume = 1f; + stepSoundPitch = 1f; + abilities.add(new ShieldArcAbility(){{ region = "tecta-shield"; radius = 45f; @@ -3452,6 +3492,10 @@ public class UnitTypes{ legStraightness = 0.6f; baseLegStraightness = 0.5f; + stepSound = Sounds.walkerStep; + stepSoundVolume = 1.1f; + stepSoundPitch = 0.9f; + legCount = 8; legLength = 30f; legForwardScl = 2.1f; diff --git a/core/src/mindustry/core/GameState.java b/core/src/mindustry/core/GameState.java index 7b7f00612d..e52bb00a0b 100644 --- a/core/src/mindustry/core/GameState.java +++ b/core/src/mindustry/core/GameState.java @@ -44,7 +44,7 @@ public class GameState{ /** Team data. Gets reset every new game. */ public Teams teams = new Teams(); /** Handles JSON edits of game content. */ - public ContentPatcher patcher = new ContentPatcher(); + public DataPatcher patcher = new DataPatcher(); /** Number of enemies in the game; only used clientside in servers. */ public int enemies; /** Map being playtested (not edited!) */ 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/BasicBulletType.java b/core/src/mindustry/entities/bullet/BasicBulletType.java index 3ff978e6a3..f0ec753f2c 100644 --- a/core/src/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/mindustry/entities/bullet/BasicBulletType.java @@ -25,8 +25,11 @@ public class BasicBulletType extends BulletType{ public BasicBulletType(float speed, float damage, String bulletSprite){ super(speed, damage); this.sprite = bulletSprite; + + hitSoundPitchRange = 0.2f; + hitSoundVolume = 0.4f; } - + public BasicBulletType(float speed, float damage){ this(speed, damage, "bullet"); } diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 63a1092317..d32d407937 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); @@ -609,7 +609,7 @@ public class BulletType extends Content implements Cloneable{ } despawnEffect.at(b.x, b.y, b.rotation(), hitColor); - despawnSound.at(b); + despawnSound.at(b, 1f + Mathf.range(hitSoundPitchRange)); Effect.shake(despawnShake, despawnShake, b); } diff --git a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java index 349b2adc8c..2683d35361 100644 --- a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java +++ b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java @@ -62,7 +62,7 @@ public class ShrapnelBulletType extends BulletType{ Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() + 90); Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() - 90); } - Drawf.tri(b.x, b.y, width * b.fout(), (realLength + 50), b.rotation()); + Drawf.tri(b.x, b.y, width * b.fout(), (realLength + 4f), b.rotation()); Drawf.tri(b.x, b.y, width * b.fout(), 10f, b.rotation() + 180f); Draw.reset(); diff --git a/core/src/mindustry/entities/comp/LegsComp.java b/core/src/mindustry/entities/comp/LegsComp.java index dbb5c76059..6155ede31e 100644 --- a/core/src/mindustry/entities/comp/LegsComp.java +++ b/core/src/mindustry/entities/comp/LegsComp.java @@ -179,6 +179,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Unitc{ floor.walkSound.at(x, y, 1f, floor.walkSoundVolume); }else{ Fx.unitLandSmall.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor); + type.stepSound.at(l.base.x, l.base.y, type.stepSoundPitch + Mathf.range(0.1f), type.stepSoundVolume); } //shake when legs contact ground diff --git a/core/src/mindustry/entities/comp/MechComp.java b/core/src/mindustry/entities/comp/MechComp.java index eb78dd030d..ce5430fb7c 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, type.stepSoundPitch + Mathf.range(0.1f), type.stepSoundVolume); } walkExtension = extendScl; diff --git a/core/src/mindustry/entities/part/RegionPart.java b/core/src/mindustry/entities/part/RegionPart.java index 9474e819b7..cd75fe2add 100644 --- a/core/src/mindustry/entities/part/RegionPart.java +++ b/core/src/mindustry/entities/part/RegionPart.java @@ -98,7 +98,7 @@ public class RegionPart extends DrawPart{ int i = params.sideOverride == -1 ? s : params.sideOverride; //can be null - var region = drawRegion ? regions[Math.min(i, regions.length - 1)] : null; + var region = drawRegion && regions.length > 0 ? regions[Math.min(i, regions.length - 1)] : null; float sign = (i == 0 ? 1 : -1) * params.sideMultiplier; Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad); diff --git a/core/src/mindustry/entities/units/AIController.java b/core/src/mindustry/entities/units/AIController.java index 6a59aca4c5..a1fffb3548 100644 --- a/core/src/mindustry/entities/units/AIController.java +++ b/core/src/mindustry/entities/units/AIController.java @@ -28,6 +28,7 @@ public class AIController implements UnitController{ /** main target that is being faced */ protected @Nullable Teamc target; protected @Nullable Teamc bomberTarget; + protected boolean turningAway; { resetTimers(); @@ -155,7 +156,8 @@ public class AIController implements UnitController{ } public void targetInvalidated(){ - //TODO: try this for normal units, reset the target timer + //immediately find a new target + timer.reset(timerTarget, -1f); } public void updateWeapons(){ @@ -169,7 +171,7 @@ public class AIController implements UnitController{ noTargetTime += Time.delta; if(invalid(target)){ - if(target != null && !target.isAdded()){ + if(target instanceof Healthc h && !h.isValid()){ targetInvalidated(); } target = null; @@ -300,14 +302,32 @@ public class AIController implements UnitController{ } public void circleAttack(float circleLength){ + if(target == null) return; + vec.set(target).sub(unit); float ang = unit.angleTo(target); float diff = Angles.angleDist(ang, unit.rotation()); + if(target instanceof Unit u && u.collisionLayer() == unit.collisionLayer()){ + float avoidDist = u.physicSize() + 30f; + if(turningAway){ + + vec.setLength(prefSpeed()).scl(-1f); + unit.movePref(vec); + + if(!unit.within(u, unit.type.circleTargetRadius*0.5f + u.physicSize())){ + turningAway = false; + } + return; + }else if(unit.within(u, avoidDist)){ + turningAway = true; + } + } + if(diff > 70f && vec.len() < circleLength){ vec.setAngle(unit.vel().angle()); - }else{ + }else if(unit.type.omniMovement){ //non-omni movement units don't need to do this as the turning is already smoothed out vec.setAngle(Angles.moveToward(unit.vel().angle(), vec.angle(), 6f)); } @@ -359,7 +379,12 @@ public class AIController implements UnitController{ if(arrive){ Tmp.v3.set(-unit.vel.x / unit.type.accel * 2f, -unit.vel.y / unit.type.accel * 2f).add((target.getX() - unit.x), (target.getY() - unit.y)); - vec.add(Tmp.v3).limit(speed * length); + if(unit.type.omniMovement){ + vec.add(Tmp.v3).limit(speed * length); + }else{ + //directly move the unit to prevent a backwards movement vector from messing things up + unit.moveAt(Tmp.v3.limit(speed * length)); + } } if(length < -0.5f){ diff --git a/core/src/mindustry/graphics/FloorRenderer.java b/core/src/mindustry/graphics/FloorRenderer.java index ebc7c5c623..33d36083a6 100644 --- a/core/src/mindustry/graphics/FloorRenderer.java +++ b/core/src/mindustry/graphics/FloorRenderer.java @@ -437,6 +437,13 @@ public class FloorRenderer{ int idx = vidx; vidx += spriteSize; + //fixes graphical artifacting due to low precision positions/UVs. TODO: test for issues + final float grow = 0.01f; + x -= grow; + y -= grow; + width += grow*2f; + height += grow*2f; + if(!Mathf.zero(rotation)){ //bottom left and top right corner points relative to origin float worldOriginX = x + originX; diff --git a/core/src/mindustry/io/SaveVersion.java b/core/src/mindustry/io/SaveVersion.java index 7f327661ae..f35061dfd8 100644 --- a/core/src/mindustry/io/SaveVersion.java +++ b/core/src/mindustry/io/SaveVersion.java @@ -461,6 +461,8 @@ public abstract class SaveVersion extends SaveFileReader{ } public void readWorldEntities(DataInput stream, Prov[] mapping) throws IOException{ + IntSet used = new IntSet(); + Seq reassign = new Seq<>(); int amount = stream.readInt(); for(int j = 0; j < amount; j++){ @@ -477,10 +479,20 @@ public abstract class SaveVersion extends SaveFileReader{ EntityGroup.checkNextId(id); entity.id(id); entity.read(in); - entity.add(); + if(used.add(id)){ + entity.add(); + }else{ + Log.warn("Duplicate entity ID in save: @ (@)", id, entity); + reassign.add(entity); + } }); } + for(var ent : reassign){ + ent.id(EntityGroup.nextId()); + ent.add(); + } + Groups.all.each(Entityc::afterReadAll); } diff --git a/core/src/mindustry/mod/ContentPatcher.java b/core/src/mindustry/mod/DataPatcher.java similarity index 99% rename from core/src/mindustry/mod/ContentPatcher.java rename to core/src/mindustry/mod/DataPatcher.java index 5976aa685b..8690c50717 100644 --- a/core/src/mindustry/mod/ContentPatcher.java +++ b/core/src/mindustry/mod/DataPatcher.java @@ -22,7 +22,7 @@ import java.util.*; /** The current implementation is awful. Consider it a proof of concept. */ @SuppressWarnings("unchecked") -public class ContentPatcher{ +public class DataPatcher{ private static final Object root = new Object(); private static final ObjectMap nameToType = new ObjectMap<>(); private static ContentParser parser = createParser(); @@ -129,6 +129,8 @@ public class ContentPatcher{ if(!Vars.headless){ if(object instanceof DrawPart part && parent instanceof MappableContent cont){ part.load(cont.name); + }else if(object instanceof DrawPart part && parent instanceof Weapon w){ + part.load(w.name); }else if(object instanceof DrawBlock draw && parent instanceof Block block){ draw.load(block); }else if(object instanceof Weapon weapon){ diff --git a/core/src/mindustry/type/Planet.java b/core/src/mindustry/type/Planet.java index fe582e484f..0a314342ce 100644 --- a/core/src/mindustry/type/Planet.java +++ b/core/src/mindustry/type/Planet.java @@ -629,7 +629,9 @@ public class Planet extends UnlockableContent{ batch.color(Tmp.c1); batch.vertex(Tmp.bz3.valueAt(Tmp.v32, f).add(normal, -stroke)); } + Gl.disable(Gl.cullFace); batch.flush(Gl.triangleStrip); + Gl.enable(Gl.cullFace); } public Vec3 lookAt(Sector sector, Vec3 out){ diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 5139516901..50b5b1af48 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -93,6 +93,8 @@ public class UnitType extends UnlockableContent implements Senseable{ mineRange = 70f, /** range at which this unit can build */ buildRange = Vars.buildingRange, + /** radius for circleTarget, if true */ + circleTargetRadius = 80f, /** multiplier for damage this (flying) unit deals when crashing on enemy things */ crashDamageMultiplier = 1f, /** multiplier for health that this flying unit has for its wreck, based on its max health. */ @@ -298,6 +300,12 @@ 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/insect unit does a step */ + public Sound stepSound = Sounds.none; + /** volume of step sound */ + public float stepSoundVolume = 0.5f; + /** base pitch of step sound */ + public float stepSoundPitch = 1f; /** effect that this unit emits when falling */ public Effect fallEffect = Fx.fallSmoke; /** effect created at engine when unit falls. */ @@ -1351,7 +1359,7 @@ public class UnitType extends UnlockableContent implements Senseable{ if(stacks != null){ ItemStack[] out = new ItemStack[stacks.length]; for(int i = 0; i < out.length; i++){ - out[i] = new ItemStack(stacks[i].item, UI.roundAmount((int)(Math.pow(stacks[i].amount, 1.1) * researchCostMultiplier))); + out[i] = new ItemStack(stacks[i].item, UI.roundAmount((int)(stacks[i].amount * researchCostMultiplier))); } //remove zero-requirements for automatic unlocks diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 25badf4493..361e915598 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -128,6 +128,10 @@ public class Weapon implements Cloneable{ public float layerOffset = 0f; /** sound used for shooting */ public Sound shootSound = Sounds.pew; + /** volume of the shoot sound */ + public float shootSoundVolume = 1f; + /** sound used when this weapon first fires; for continuous weapons only */ + public Sound initialShootSound = Sounds.none; /** sound used for weapons that have a delay */ public Sound chargeSound = Sounds.none; /** sound played when there is nothing to shoot */ @@ -498,7 +502,9 @@ public class Weapon implements Cloneable{ handleBullet(unit, mount, mount.bullet); if(!continuous){ - shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax)); + shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume); + }else{ + initialShootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume); } ejectEffect.at(mountX, mountY, angle * Mathf.sign(this.x)); diff --git a/core/src/mindustry/world/blocks/campaign/LandingPad.java b/core/src/mindustry/world/blocks/campaign/LandingPad.java index 95803981a6..73135581fa 100644 --- a/core/src/mindustry/world/blocks/campaign/LandingPad.java +++ b/core/src/mindustry/world/blocks/campaign/LandingPad.java @@ -3,6 +3,7 @@ package mindustry.world.blocks.campaign; import arc.*; import arc.Graphics.*; import arc.Graphics.Cursor.*; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -52,6 +53,10 @@ public class LandingPad extends Block{ public float liquidPad = 2f; public Color bottomColor = Pal.darkerMetal; + public float landSoundVolume = 0.75f; + //impact timing must be exactly equal to arrivalDuration + public Sound landSound = Sounds.padLand; + public LandingPad(String name){ super(name); @@ -145,6 +150,7 @@ public class LandingPad extends Block{ arriving = config; arrivingTimer = 0f; liquidRemoved = 0f; + landSound.at(x, y, 1f, landSoundVolume); if(state.isCampaign() && !isFake()){ state.rules.sector.info.importCooldownTimers.put(config, 0f); diff --git a/core/src/mindustry/world/blocks/campaign/LaunchPad.java b/core/src/mindustry/world/blocks/campaign/LaunchPad.java index 791c7ef483..c6f58739c7 100644 --- a/core/src/mindustry/world/blocks/campaign/LaunchPad.java +++ b/core/src/mindustry/world/blocks/campaign/LaunchPad.java @@ -30,7 +30,8 @@ import static mindustry.Vars.*; public class LaunchPad extends Block{ /** Time between launches. */ public float launchTime = 1f; - public Sound launchSound = Sounds.none; + public float launchSoundPitchRand = 0.1f; + public Sound launchSound = Sounds.padLaunch; public @Load("@-light") TextureRegion lightRegion; public @Load(value = "@-pod", fallback = "launchpod") TextureRegion podRegion; @@ -145,7 +146,7 @@ public class LaunchPad extends Block{ if((launchCounter += edelta()) >= launchTime && items.total() >= itemCapacity){ //if there are item requirements, use those. consume(); - launchSound.at(x, y); + launchSound.at(x, y, 1f + Mathf.range(launchSoundPitchRand)); LaunchPayload entity = LaunchPayload.create(); items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount))); entity.set(this); diff --git a/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java b/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java index 97aedf43b5..2fdc39f416 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java @@ -27,7 +27,7 @@ public class PointDefenseTurret extends ReloadTurret{ public Effect hitEffect = Fx.pointHit; public Effect shootEffect = Fx.sparkShoot; - public Sound shootSound = Sounds.lasershoot; + public Sound shootSound = Sounds.shootSegment; public float shootCone = 5f; public float bulletDamage = 10f; diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 105be42df5..d3c0542076 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -119,6 +119,8 @@ public class Turret extends ReloadTurret{ public Effect ammoUseEffect = Fx.none; /** Sound emitted when a single bullet is shot. */ public Sound shootSound = Sounds.shoot; + /** Volume of shooting sound. */ + public float shootSoundVolume = 1f; /** Sound emitted when shoot.firstShotDelay is >0 and shooting begins. */ public Sound chargeSound = Sounds.none; /** The sound that this block makes while active. One sound loop. Do not overuse. */ @@ -735,7 +737,7 @@ public class Turret extends ReloadTurret{ (shootEffect == null ? type.shootEffect : shootEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor); (smokeEffect == null ? type.smokeEffect : smokeEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor); - shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax)); + shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume); ammoUseEffect.at( x - Angles.trnsx(rotation, ammoEjectBack), 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/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index 694acd3b40..756f2a8eef 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -34,6 +34,8 @@ public class NuclearReactor extends PowerGenerator{ public float heatOutput = 15f; /** rate at which heat progress increases */ public float heatWarmupRate = 1f; + /** time taken to cool down if no fuel is inputted even if coolant is not present*/ + public float ambientCooldownTime = 60f * 20f; /** threshold at which block starts smoking */ public float smokeThreshold = 0.3f; /** heat threshold at which lights start flashing */ @@ -66,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{ explosionDamage = 1250 * 4; explodeEffect = Fx.reactorExplosion; - explodeSound = Sounds.explosionbig; + explodeSound = Sounds.reactorExplosion; } @Override @@ -104,6 +106,7 @@ public class NuclearReactor extends PowerGenerator{ } }else{ productionEfficiency = 0f; + heat = Math.max(0f, heat - Time.delta / ambientCooldownTime); } if(heat > 0){ diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index 014a5874e1..aa69e11714 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -82,7 +82,7 @@ public class Drill extends Block{ liquidCapacity = 5f; hasItems = true; ambientSound = Sounds.drill; - ambientSoundVolume = 0.018f; + ambientSoundVolume = 0.019f; //drills work in space I guess envEnabled |= Env.space; flags = EnumSet.of(BlockFlag.drill);