diff --git a/core/assets/sounds/plasmaboom.ogg b/core/assets/sounds/plasmaboom.ogg new file mode 100644 index 0000000000..fab2f3471d Binary files /dev/null and b/core/assets/sounds/plasmaboom.ogg differ diff --git a/core/assets/sounds/plasmadrop.ogg b/core/assets/sounds/plasmadrop.ogg new file mode 100644 index 0000000000..57bd0b8e27 Binary files /dev/null and b/core/assets/sounds/plasmadrop.ogg differ diff --git a/core/src/mindustry/audio/LoopControl.java b/core/src/mindustry/audio/LoopControl.java index 2419406176..a01aad5e85 100644 --- a/core/src/mindustry/audio/LoopControl.java +++ b/core/src/mindustry/audio/LoopControl.java @@ -10,6 +10,12 @@ import mindustry.*; public class LoopControl{ private ObjectMap sounds = new ObjectMap<>(); + public void play(Sound sound, float volume){ + if(Vars.headless) return; + + play(sound, Core.camera.position, volume); + } + public void play(Sound sound, Position pos, float volume){ if(Vars.headless) return; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index add391402e..e3129d3ad8 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1307,6 +1307,9 @@ public class UnitTypes implements ContentList{ reload = 55f; minShootVelocity = 0.01f; + soundPitchMin = 1f; + shootSound = Sounds.plasmadrop; + bullet = new BasicBulletType(){{ sprite = "large-bomb"; width = height = 120/4f; @@ -1318,9 +1321,10 @@ public class UnitTypes implements ContentList{ frontColor = Color.white; mixColorTo = Color.white; + hitSound = Sounds.plasmaboom; + shootCone = 180f; ejectEffect = Fx.none; - shootSound = Sounds.none; despawnShake = 4f; collidesAir = false; diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index c883cbd5ba..d4c20eaf5e 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -199,11 +199,14 @@ public class LExecutor{ //bind to the next unit exec.setconst(varUnit, seq.get(index)); } - index ++; + index++; }else{ //no units of this type found exec.setconst(varUnit, null); } + }else if(exec.obj(type) instanceof Unit u && u.team == exec.team){ + //bind to specific unit object + exec.setconst(varUnit, u); }else{ exec.setconst(varUnit, null); } diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index ed6145ceae..8e724a7ecb 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -89,9 +89,9 @@ public abstract class Weather extends UnlockableContent{ } } - if(sound != Sounds.none){ + if(!headless && sound != Sounds.none){ float noise = soundVolOscMag > 0 ? (float)Math.abs(Noise.rawNoise(Time.time() / soundVolOscScl)) * soundVolOscMag : 0; - loops.play(sound, Core.camera.position, Math.max((soundVol + noise) * state.opacity, soundVolMin)); + loops.play(sound, Math.max((soundVol + noise) * state.opacity, soundVolMin)); } } diff --git a/core/src/mindustry/world/meta/values/AmmoListValue.java b/core/src/mindustry/world/meta/values/AmmoListValue.java index 359b958a96..ba6a0d8a50 100644 --- a/core/src/mindustry/world/meta/values/AmmoListValue.java +++ b/core/src/mindustry/world/meta/values/AmmoListValue.java @@ -41,10 +41,13 @@ public class AmmoListValue implements StatValue{ sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1))); } - if(!Mathf.equal(type.ammoMultiplier, 1f)) + if(!Mathf.equal(type.ammoMultiplier, 1f) && !(type instanceof LiquidBulletType)){ sep(bt, Core.bundle.format("bullet.multiplier", (int)type.ammoMultiplier)); - if(!Mathf.equal(type.reloadMultiplier, 1f)) + } + + if(!Mathf.equal(type.reloadMultiplier, 1f)){ sep(bt, Core.bundle.format("bullet.reload", Strings.fixed(type.reloadMultiplier, 1))); + } if(type.knockback > 0){ sep(bt, Core.bundle.format("bullet.knockback", Strings.fixed(type.knockback, 1))); diff --git a/gradle.properties b/gradle.properties index ee126bcf75..cd20e76ae5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=a6f488d6f741b98d123113ceb26439032be0719e +archash=