diff --git a/core/assets/sounds/grinding.ogg b/core/assets/sounds/grinding.ogg new file mode 100644 index 0000000000..f78d2c4e67 Binary files /dev/null and b/core/assets/sounds/grinding.ogg differ diff --git a/core/assets/sounds/pew.ogg b/core/assets/sounds/pew.ogg index d4b1c791c6..207b69d389 100644 Binary files a/core/assets/sounds/pew.ogg and b/core/assets/sounds/pew.ogg differ diff --git a/core/assets/sounds/shootSnap.ogg b/core/assets/sounds/shootSnap.ogg index fc692486a0..17826bb5c0 100644 Binary files a/core/assets/sounds/shootSnap.ogg and b/core/assets/sounds/shootSnap.ogg differ diff --git a/core/assets/sounds/steam.ogg b/core/assets/sounds/steam.ogg new file mode 100644 index 0000000000..9b65bac938 Binary files /dev/null and b/core/assets/sounds/steam.ogg differ diff --git a/core/assets/sounds/techloop.ogg b/core/assets/sounds/techloop.ogg new file mode 100644 index 0000000000..6ac0d990a4 Binary files /dev/null and b/core/assets/sounds/techloop.ogg differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index cd8dcdc4d7..df0241b8e8 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -592,6 +592,9 @@ public class Blocks implements ContentList{ hasPower = true; drawer = new DrawWeave(); + ambientSound = Sounds.techloop; + ambientSoundVolume = 0.05f; + consumes.items(with(Items.thorium, 4, Items.sand, 10)); consumes.power(5f); itemCapacity = 20; @@ -720,6 +723,8 @@ public class Blocks implements ContentList{ updateEffect = Fx.pulverizeSmall; hasItems = hasPower = true; drawer = new DrawRotator(); + ambientSound = Sounds.grinding; + ambientSoundVolume = 0.02f; consumes.item(Items.scrap, 1); consumes.power(0.50f); @@ -1184,6 +1189,8 @@ public class Blocks implements ContentList{ hasLiquids = true; hasItems = true; size = 3; + ambientSound = Sounds.steam; + ambientSoundVolume = 0.03f; consumes.item(Items.pyratite).optional(true, false); consumes.liquid(Liquids.cryofluid, 0.1f); @@ -1802,8 +1809,8 @@ public class Blocks implements ContentList{ shootDuration = 220f; powerUse = 17f; shootSound = Sounds.laserbig; - activeSound = Sounds.beam; - activeSoundVolume = 2f; + loopSound = Sounds.beam; + loopSoundVolume = 2f; shootType = new ContinuousLaserBulletType(70){{ length = 200f; diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 1e0ea5b3d4..15792f0993 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -107,8 +107,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, this.block = block; this.team = team; - if(block.activeSound != Sounds.none){ - sound = new SoundLoop(block.activeSound, block.activeSoundVolume); + if(block.loopSound != Sounds.none){ + sound = new SoundLoop(block.loopSound, block.loopSoundVolume); } health = block.health; @@ -1367,8 +1367,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, sound.update(x, y, shouldActiveSound()); } - if(block.idleSound != Sounds.none && shouldIdleSound()){ - loops.play(block.idleSound, self(), block.idleSoundVolume); + if(block.ambientSound != Sounds.none && shouldIdleSound()){ + loops.play(block.ambientSound, self(), block.ambientSoundVolume); } if(enabled || !block.noUpdateDisabled){ diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 0202750aaf..963e171272 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -174,14 +174,14 @@ public class Block extends UnlockableContent{ public float lightRadius = 60f; /** The sound that this block makes while active. One sound loop. Do not overuse.*/ - public Sound activeSound = Sounds.none; + public Sound loopSound = Sounds.none; /** Active sound base volume. */ - public float activeSoundVolume = 0.5f; + public float loopSoundVolume = 0.5f; /** The sound that this block makes while idle. Uses one sound loop for all blocks.*/ - public Sound idleSound = Sounds.none; + public Sound ambientSound = Sounds.none; /** Idle sound base volume. */ - public float idleSoundVolume = 0.5f; + public float ambientSoundVolume = 0.05f; /** Cost of constructing this block. */ public ItemStack[] requirements = {}; diff --git a/core/src/mindustry/world/blocks/defense/ForceProjector.java b/core/src/mindustry/world/blocks/defense/ForceProjector.java index ea78aa059e..e13b7d4345 100644 --- a/core/src/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/mindustry/world/blocks/defense/ForceProjector.java @@ -51,8 +51,8 @@ public class ForceProjector extends Block{ hasPower = true; hasLiquids = true; hasItems = true; - idleSound = Sounds.shield; - idleSoundVolume = 0.08f; + ambientSound = Sounds.shield; + ambientSoundVolume = 0.08f; consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.1f)).boost().update(false); } diff --git a/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java b/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java index 8ab8b5cb41..80771f0001 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java @@ -25,7 +25,7 @@ public class LiquidTurret extends Turret{ super(name); acceptCoolant = false; hasLiquids = true; - activeSound = Sounds.spray; + loopSound = Sounds.spray; } /** Initializes accepted ammo map. Format: [liquid1, bullet1, liquid2, bullet2...] */ diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index e4d2baa25c..4259a9a50f 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -41,8 +41,8 @@ public class Conveyor extends Block implements Autotiler{ itemCapacity = 4; conveyorPlacement = true; - idleSound = Sounds.conveyor; - idleSoundVolume = 0.004f; + ambientSound = Sounds.conveyor; + ambientSoundVolume = 0.004f; unloadable = false; noUpdateDisabled = false; } diff --git a/core/src/mindustry/world/blocks/distribution/StackConveyor.java b/core/src/mindustry/world/blocks/distribution/StackConveyor.java index 6454cdb5bf..b5d6b0c7ed 100644 --- a/core/src/mindustry/world/blocks/distribution/StackConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/StackConveyor.java @@ -44,8 +44,8 @@ public class StackConveyor extends Block implements Autotiler{ itemCapacity = 10; conveyorPlacement = true; - idleSound = Sounds.conveyor; - idleSoundVolume = 0.004f; + ambientSound = Sounds.conveyor; + ambientSoundVolume = 0.004f; unloadable = false; } diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index ef4ab64b27..be022d505e 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -66,8 +66,8 @@ public class Drill extends Block{ hasLiquids = true; liquidCapacity = 5f; hasItems = true; - idleSound = Sounds.drill; - idleSoundVolume = 0.003f; + ambientSound = Sounds.drill; + ambientSoundVolume = 0.003f; } @Override diff --git a/core/src/mindustry/world/blocks/production/GenericCrafter.java b/core/src/mindustry/world/blocks/production/GenericCrafter.java index 051fbe9f25..2019e83468 100644 --- a/core/src/mindustry/world/blocks/production/GenericCrafter.java +++ b/core/src/mindustry/world/blocks/production/GenericCrafter.java @@ -9,7 +9,6 @@ import mindustry.entities.*; import mindustry.gen.*; import mindustry.type.*; import mindustry.world.*; -import mindustry.world.consumers.*; import mindustry.world.draw.*; import mindustry.world.meta.*; @@ -29,9 +28,9 @@ public class GenericCrafter extends Block{ update = true; solid = true; hasItems = true; - idleSound = Sounds.machine; + ambientSound = Sounds.machine; sync = true; - idleSoundVolume = 0.03f; + ambientSoundVolume = 0.03f; flags = EnumSet.of(BlockFlag.factory); } diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index b89b1ec293..df3686baff 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -50,8 +50,8 @@ public class CoreBlock extends StorageBlock{ priority = TargetPriority.core; flags = EnumSet.of(BlockFlag.core, BlockFlag.unitModifier); unitCapModifier = 10; - activeSound = Sounds.respawning; - activeSoundVolume = 1f; + loopSound = Sounds.respawning; + loopSoundVolume = 1f; group = BlockGroup.none; } diff --git a/gradle.properties b/gradle.properties index 016cbbd7a5..f99b402682 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=2e64aea5855e8a8a0c189c273b6d547e61cbe701 +archash=415bed2cddfdf53f78a7d7131ec2c33405245462