Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

This commit is contained in:
Anuken
2021-08-20 11:10:55 -04:00
4 changed files with 11 additions and 5 deletions

View File

@@ -637,6 +637,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);
@@ -653,6 +655,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);
@@ -684,6 +688,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);

View File

@@ -31,7 +31,7 @@ public class SpawnPathFilter extends GenerateFilter{
@Override
public void apply(Tiles tiles, GenerateInput in){
Tile core = null;
var cores = new Seq<Tile>();
var spawns = new Seq<Tile>();
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){