diff --git a/core/assets/sounds/tankMove.ogg b/core/assets/sounds/tankMove.ogg new file mode 100644 index 0000000000..41115a5090 Binary files /dev/null and b/core/assets/sounds/tankMove.ogg differ diff --git a/core/assets/sounds/tankMoveHeavy.ogg b/core/assets/sounds/tankMoveHeavy.ogg new file mode 100644 index 0000000000..8152305d2e Binary files /dev/null and b/core/assets/sounds/tankMoveHeavy.ogg differ diff --git a/core/assets/sounds/tankMoveSmall.ogg b/core/assets/sounds/tankMoveSmall.ogg new file mode 100644 index 0000000000..dbc709f2a8 Binary files /dev/null and b/core/assets/sounds/tankMoveSmall.ogg differ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 02240099f8..9bc9fdbe47 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -2590,6 +2590,9 @@ public class UnitTypes{ treadRects = new Rect[]{new Rect(12 - 32f, 7 - 32f, 14, 51)}; researchCostMultiplier = 0f; + tankMoveVolume *= 0.6f; + tankMoveSound = Sounds.tankMoveSmall; + weapons.add(new Weapon("stell-weapon"){{ shootSound = Sounds.shootStell; layerOffset = 0.0001f; @@ -2633,6 +2636,9 @@ public class UnitTypes{ treadRects = new Rect[]{new Rect(17 - 96f/2f, 10 - 96f/2f, 19, 76)}; researchCostMultiplier = 0f; + tankMoveVolume *= 0.75f; + tankMoveSound = Sounds.tankMove; + weapons.add(new Weapon("locus-weapon"){{ shootSound = Sounds.bolt; layerOffset = 0.0001f; @@ -2786,6 +2792,9 @@ public class UnitTypes{ immunities.addAll(StatusEffects.burning, StatusEffects.melting); treadRects = new Rect[]{new Rect(22 - 154f/2f, 16 - 154f/2f, 28, 130)}; + tankMoveVolume *= 1.25f; + tankMoveSound = Sounds.tankMoveHeavy; + weapons.add(new Weapon("vanquish-weapon"){{ shootSound = Sounds.mediumCannon; layerOffset = 0.0001f; @@ -2884,6 +2893,9 @@ public class UnitTypes{ floorMultiplier = 0.3f; immunities.addAll(StatusEffects.burning, StatusEffects.melting); + tankMoveVolume *= 1.5f; + tankMoveSound = Sounds.tankMoveHeavy; + float xo = 231f/2f, yo = 231f/2f; treadRects = new Rect[]{new Rect(27 - xo, 152 - yo, 56, 73), new Rect(24 - xo, 51 - 9 - yo, 29, 17), new Rect(59 - xo, 18 - 9 - yo, 39, 19)}; @@ -3295,7 +3307,7 @@ public class UnitTypes{ weapons.add(new Weapon("anthicus-weapon"){{ shootSound = Sounds.missileLarge; - shootSoundVolume = 0.8f; + shootSoundVolume = 0.65f; x = 29f / 4f; y = -11f / 4f; shootY = 1.5f; diff --git a/core/src/mindustry/entities/comp/TankComp.java b/core/src/mindustry/entities/comp/TankComp.java index 5f998e5546..4fa36348ba 100644 --- a/core/src/mindustry/entities/comp/TankComp.java +++ b/core/src/mindustry/entities/comp/TankComp.java @@ -50,6 +50,8 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{ treadEffectTime = 0f; } + + control.sound.loop(type.tankMoveSound, this, type.tankMoveVolume); } lastDeepFloor = null; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 4360b8635c..ddf216e494 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -306,6 +306,10 @@ public class UnitType extends UnlockableContent implements Senseable{ public float stepSoundVolume = 0.5f; /** base pitch of step sound */ public float stepSoundPitch = 1f, stepSoundPitchRange = 0.1f; + /** sound looped when tank moves */ + public Sound tankMoveSound = Sounds.tankMove; + /** volume of tank move sfx */ + public float tankMoveVolume = 0.5f; /** effect that this unit emits when falling */ public Effect fallEffect = Fx.fallSmoke; /** effect created at engine when unit falls. */