diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index b15d24ae7a..b783221cbc 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -509,6 +509,8 @@ public class Blocks implements ContentList{ hasPower = true; hasLiquids = false; drawer = new DrawSmelter(Color.valueOf("ffef99")); + ambientSound = Sounds.smelter; + ambientSoundVolume = 0.07f; consumes.items(with(Items.coal, 1, Items.sand, 2)); consumes.power(0.50f); @@ -525,6 +527,8 @@ public class Blocks implements ContentList{ itemCapacity = 30; boostScale = 0.15f; drawer = new DrawSmelter(Color.valueOf("ffef99")); + ambientSound = Sounds.smelter; + ambientSoundVolume = 0.07f; consumes.items(with(Items.coal, 4, Items.sand, 6, Items.pyratite, 1)); consumes.power(4f); @@ -538,6 +542,8 @@ public class Blocks implements ContentList{ size = 2; hasPower = hasItems = true; drawer = new DrawSmelter(Color.valueOf("ffc099")); + ambientSound = Sounds.smelter; + ambientSoundVolume = 0.07f; consumes.items(with(Items.lead, 1, Items.sand, 1)); consumes.power(0.60f); diff --git a/core/src/mindustry/maps/filters/SpawnPathFilter.java b/core/src/mindustry/maps/filters/SpawnPathFilter.java index 09d453e513..0495baa839 100644 --- a/core/src/mindustry/maps/filters/SpawnPathFilter.java +++ b/core/src/mindustry/maps/filters/SpawnPathFilter.java @@ -31,7 +31,7 @@ public class SpawnPathFilter extends GenerateFilter{ @Override public void apply(Tiles tiles, GenerateInput in){ - Tile core = null; + var cores = new Seq(); var spawns = new Seq(); for(Tile tile : tiles){ @@ -39,11 +39,11 @@ public class SpawnPathFilter extends GenerateFilter{ spawns.add(tile); } if(tile.block() instanceof CoreBlock && tile.team() != Vars.state.rules.waveTeam){ - core = tile; + cores.add(tile); } } - if(core != null && spawns.any()){ + for(var core : cores){ for(var spawn : spawns){ var path = Astar.pathfind(core.x, core.y, spawn.x, spawn.y, t -> t.solid() ? 100 : 1, Astar.manhattan, tile -> !tile.floor().isDeep()); for(var tile : path){