diff --git a/core/assets/contributors b/core/assets/contributors index 9f1cf8c9f4..3653fb05c7 100644 --- a/core/assets/contributors +++ b/core/assets/contributors @@ -96,3 +96,5 @@ YellOw139 PetrGasparik LeoDog896 Summet +jalastram (freesound.org) +newlocknew (freesound.org) \ No newline at end of file diff --git a/core/assets/sounds/artillery.ogg b/core/assets/sounds/artillery.ogg index e3651f5ce1..d9f8b74d75 100644 Binary files a/core/assets/sounds/artillery.ogg and b/core/assets/sounds/artillery.ogg differ diff --git a/core/assets/sounds/laserblast.ogg b/core/assets/sounds/laserblast.ogg new file mode 100644 index 0000000000..a23146a436 Binary files /dev/null and b/core/assets/sounds/laserblast.ogg differ diff --git a/core/assets/sounds/lasershoot.ogg b/core/assets/sounds/lasershoot.ogg new file mode 100644 index 0000000000..d25c17a4cb Binary files /dev/null and b/core/assets/sounds/lasershoot.ogg differ diff --git a/core/assets/sounds/rain.ogg b/core/assets/sounds/rain.ogg new file mode 100644 index 0000000000..ecf90ea73d Binary files /dev/null and b/core/assets/sounds/rain.ogg differ diff --git a/core/assets/sounds/wind.ogg b/core/assets/sounds/wind.ogg new file mode 100644 index 0000000000..aeabe4802b Binary files /dev/null and b/core/assets/sounds/wind.ogg differ diff --git a/core/assets/sprites/block_colors.png b/core/assets/sprites/block_colors.png index daa23a8efc..b390ccaa46 100644 Binary files a/core/assets/sprites/block_colors.png and b/core/assets/sprites/block_colors.png differ diff --git a/core/assets/sprites/fallback/sprites5.png b/core/assets/sprites/fallback/sprites5.png index 57c5ea660c..8579c89af2 100644 Binary files a/core/assets/sprites/fallback/sprites5.png and b/core/assets/sprites/fallback/sprites5.png differ diff --git a/core/assets/sprites/sprites2.png b/core/assets/sprites/sprites2.png index 4d36e2f434..738333c074 100644 Binary files a/core/assets/sprites/sprites2.png and b/core/assets/sprites/sprites2.png differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index df0241b8e8..e894530330 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1471,7 +1471,7 @@ public class Blocks implements ContentList{ inaccuracy = 1f; shootCone = 10f; health = 260; - shootSound = Sounds.artillery; + shootSound = Sounds.bang; }}; wave = new LiquidTurret("wave"){{ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index c32d4113ed..68d6a12ada 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -166,7 +166,7 @@ public class UnitTypes implements ContentList{ recoil = 5f; shake = 2f; ejectEffect = Fx.casing3; - shootSound = Sounds.artillery; + shootSound = Sounds.bang; shots = 3; inaccuracy = 3f; shotDelay = 4f; @@ -226,7 +226,7 @@ public class UnitTypes implements ContentList{ recoil = 5f; shake = 2f; ejectEffect = Fx.casing4; - shootSound = Sounds.artillery; + shootSound = Sounds.bang; bullet = new BasicBulletType(13f, 60){{ pierce = true; @@ -1252,6 +1252,7 @@ public class UnitTypes implements ContentList{ weapons.add( new Weapon("heal-weapon-mount"){{ + shootSound = Sounds.lasershoot; reload = 25f; x = 8f; y = -6f; @@ -1259,6 +1260,7 @@ public class UnitTypes implements ContentList{ bullet = Bullets.healBulletBig; }}, new Weapon("heal-weapon-mount"){{ + shootSound = Sounds.lasershoot; reload = 15f; x = 4f; y = 5f; diff --git a/core/src/mindustry/content/Weathers.java b/core/src/mindustry/content/Weathers.java index 2984be1ac1..112417b1f3 100644 --- a/core/src/mindustry/content/Weathers.java +++ b/core/src/mindustry/content/Weathers.java @@ -3,6 +3,7 @@ package mindustry.content; import arc.graphics.*; import arc.util.*; import mindustry.ctype.*; +import mindustry.gen.*; import mindustry.type.*; import mindustry.type.weather.*; import mindustry.world.meta.*; @@ -29,6 +30,8 @@ public class Weathers implements ContentList{ attrs.set(Attribute.light, -0.2f); attrs.set(Attribute.water, 0.2f); status = StatusEffects.wet; + sound = Sounds.rain; + soundVolume = 0.25f; }}; sandstorm = new ParticleWeather("sandstorm"){{ @@ -46,6 +49,8 @@ public class Weathers implements ContentList{ attrs.set(Attribute.water, -0.1f); opacityMultiplier = 0.8f; force = 0.1f; + sound = Sounds.wind; + soundVolume = 0.3f; }}; sporestorm = new ParticleWeather("sporestorm"){{ @@ -65,6 +70,8 @@ public class Weathers implements ContentList{ status = StatusEffects.sporeSlowed; opacityMultiplier = 0.85f; force = 0.1f; + sound = Sounds.wind; + soundVolume = 0.3f; }}; fog = new ParticleWeather("fog"){{ diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index 4d17ab7c0e..0a1670a256 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -1,12 +1,14 @@ package mindustry.type; import arc.*; +import arc.audio.*; import arc.func.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; import arc.math.geom.*; import arc.util.*; +import arc.util.noise.*; import mindustry.annotations.Annotations.*; import mindustry.content.*; import mindustry.ctype.*; @@ -22,6 +24,9 @@ public abstract class Weather extends UnlockableContent{ public float duration = 9f * Time.toMinutes; public float opacityMultiplier = 1f; public Attributes attrs = new Attributes(); + public Sound sound = Sounds.none; + public float soundVolume = 0.1f; + public float soundVolumeOscMag = 0f, soundVolumeOscScl = 20f; //internals public Rand rand = new Rand(); @@ -83,6 +88,11 @@ public abstract class Weather extends UnlockableContent{ state.effectTimer -= Time.delta; } } + + if(sound != Sounds.none){ + float noise = soundVolumeOscMag > 0 ? (float)Math.abs(Noise.rawNoise(Time.time() / soundVolumeOscScl)) * soundVolumeOscMag : 0; + loops.play(sound, Core.camera.position, (soundVolume + noise) * state.opacity); + } } public void drawOver(WeatherState state){