diff --git a/core/assets/maps/fungalPass.msav b/core/assets/maps/fungalPass.msav index 99dae10492..b9a6f6575b 100644 Binary files a/core/assets/maps/fungalPass.msav and b/core/assets/maps/fungalPass.msav differ diff --git a/core/assets/sounds/mud.ogg b/core/assets/sounds/mud.ogg new file mode 100644 index 0000000000..8eb75cb67e Binary files /dev/null and b/core/assets/sounds/mud.ogg differ diff --git a/core/assets/sounds/splash.ogg b/core/assets/sounds/splash.ogg index 4b6e5eec53..59a77836c4 100644 Binary files a/core/assets/sounds/splash.ogg and b/core/assets/sounds/splash.ogg differ diff --git a/core/assets/sounds/swish.ogg b/core/assets/sounds/swish.ogg new file mode 100644 index 0000000000..4b6e5eec53 Binary files /dev/null and b/core/assets/sounds/swish.ogg differ diff --git a/core/assets/sounds/tractorbeam.ogg b/core/assets/sounds/tractorbeam.ogg new file mode 100644 index 0000000000..4c307c4e08 Binary files /dev/null and b/core/assets/sounds/tractorbeam.ogg differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 89304f1289..2146214553 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -288,6 +288,10 @@ public class Blocks implements ContentList{ attributes.set(Attribute.water, 1f); cacheLayer = CacheLayer.mud; albedo = 0.35f; + walkSound = Sounds.mud; + walkSoundVolume = 0.08f; + walkSoundPitchMin = 0.4f; + walkSoundPitchMax = 0.5f; }}; ((ShallowLiquid)darksandTaintedWater).set(Blocks.taintedWater, Blocks.darksand); @@ -593,7 +597,7 @@ public class Blocks implements ContentList{ drawer = new DrawWeave(); ambientSound = Sounds.techloop; - ambientSoundVolume = 0.05f; + ambientSoundVolume = 0.02f; consumes.items(with(Items.thorium, 4, Items.sand, 10)); consumes.power(5f); @@ -1225,7 +1229,7 @@ public class Blocks implements ContentList{ thoriumReactor = new NuclearReactor("thorium-reactor"){{ requirements(Category.power, with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50)); ambientSound = Sounds.hum; - ambientSoundVolume = 0.16f; + ambientSoundVolume = 0.2f; size = 3; health = 700; itemDuration = 360f; diff --git a/core/src/mindustry/entities/comp/FlyingComp.java b/core/src/mindustry/entities/comp/FlyingComp.java index 0c8c2f0277..be7b003baa 100644 --- a/core/src/mindustry/entities/comp/FlyingComp.java +++ b/core/src/mindustry/entities/comp/FlyingComp.java @@ -75,10 +75,14 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{ wasFlying = isFlying(); } - if(!hovering && isGrounded() && floor.isLiquid){ + if(!hovering && isGrounded()){ if((splashTimer += Mathf.dst(deltaX(), deltaY())) >= (7f + hitSize()/8f)){ floor.walkEffect.at(x, y, hitSize() / 8f, floor.mapColor); splashTimer = 0f; + + if(!(this instanceof WaterMovec)){ + floor.walkSound.at(x, y, Mathf.random(floor.walkSoundPitchMin, floor.walkSoundPitchMax), floor.walkSoundVolume); + } } } diff --git a/core/src/mindustry/entities/comp/LegsComp.java b/core/src/mindustry/entities/comp/LegsComp.java index e6022ed91e..8ddb4793e4 100644 --- a/core/src/mindustry/entities/comp/LegsComp.java +++ b/core/src/mindustry/entities/comp/LegsComp.java @@ -112,6 +112,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{ Floor floor = Vars.world.floorWorld(l.base.x, l.base.y); if(floor.isLiquid){ floor.walkEffect.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor); + floor.walkSound.at(x, y, 1f, floor.walkSoundVolume); }else{ Fx.unitLandSmall.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor); } diff --git a/core/src/mindustry/logic/LAssembler.java b/core/src/mindustry/logic/LAssembler.java index 23293d6b14..0e628e2333 100644 --- a/core/src/mindustry/logic/LAssembler.java +++ b/core/src/mindustry/logic/LAssembler.java @@ -96,11 +96,13 @@ public class LAssembler{ if(data == null || data.isEmpty()) return new Seq<>(); Seq statements = new Seq<>(); - String[] lines = data.split("[;\n]+"); + String[] lines = data.split("\n"); int index = 0; for(String line : lines){ //comments if(line.startsWith("#")) continue; + //remove trailing semicolons in case someone adds them in for no reason + if(line.endsWith(";")) line = line.substring(0, line.length() - 1); if(index++ > max) break; diff --git a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java index 92856f6709..99ecdd9c13 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java @@ -1,5 +1,6 @@ package mindustry.world.blocks.defense.turrets; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -34,6 +35,9 @@ public class TractorBeamTurret extends BaseTurret{ public StatusEffect status = StatusEffects.none; public float statusDuration = 300; + public Sound shootSound = Sounds.tractorbeam; + public float shootSoundVolume = 0.9f; + public TractorBeamTurret(String name){ super(name); @@ -91,6 +95,8 @@ public class TractorBeamTurret extends BaseTurret{ //look at target if(target != null && target.within(this, range) && target.team() != team && target.type.flying && efficiency() > 0.01f){ + loops.play(shootSound, this, shootSoundVolume); + any = true; float dest = angleTo(target); rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta()); diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index 1f6cd46cc9..fa7d52b918 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -42,7 +42,7 @@ public class Conveyor extends Block implements Autotiler{ conveyorPlacement = true; ambientSound = Sounds.conveyor; - ambientSoundVolume = 0.004f; + ambientSoundVolume = 0.002f; unloadable = false; noUpdateDisabled = false; } diff --git a/core/src/mindustry/world/blocks/environment/Floor.java b/core/src/mindustry/world/blocks/environment/Floor.java index 113617cc63..c6233c52d6 100644 --- a/core/src/mindustry/world/blocks/environment/Floor.java +++ b/core/src/mindustry/world/blocks/environment/Floor.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.environment; import arc.*; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.graphics.g2d.TextureAtlas.*; @@ -10,6 +11,7 @@ import arc.struct.*; import arc.util.*; import mindustry.content.*; import mindustry.entities.*; +import mindustry.gen.*; import mindustry.graphics.*; import mindustry.graphics.MultiPacker.*; import mindustry.type.*; @@ -33,7 +35,11 @@ public class Floor extends Block{ /** How many ticks it takes to drown on this. */ public float drownTime = 0f; /** Effect when walking on this floor. */ - public Effect walkEffect = Fx.ripple; + public Effect walkEffect = Fx.none; + /** Sound made when walking. */ + public Sound walkSound = Sounds.none; + /** Volume of sound made when walking. */ + public float walkSoundVolume = 0.1f, walkSoundPitchMin = 0.8f, walkSoundPitchMax = 1.2f; /** Effect displayed when drowning on this floor. */ public Effect drownUpdateEffect = Fx.bubble; /** Status effect applied when walking on. */ @@ -115,6 +121,14 @@ public class Floor extends Block{ if(decoration == Blocks.air){ decoration = content.blocks().min(b -> b instanceof Boulder && b.breakable ? mapColor.diff(b.mapColor) : Float.POSITIVE_INFINITY); } + + if(isLiquid && walkEffect == Fx.none){ + walkEffect = Fx.ripple; + } + + if(isLiquid && walkSound == Sounds.none){ + walkSound = Sounds.splash; + } } @Override diff --git a/gradle.properties b/gradle.properties index f7f135aa4c..d6dced3c14 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=f0ff5f7d844bb184ebb548cd78b6e1a921de2ee9 +archash=b99073959675a037f3a722a7ca08d28c21e10038