Fixed increased router storage / Fixed instant building after reload

This commit is contained in:
Anuken
2018-10-19 08:47:19 -04:00
parent 44479930df
commit 74cf91f99e
3 changed files with 7 additions and 3 deletions

View File

@@ -8,8 +8,6 @@ import io.anuke.ucore.core.Settings;
import static io.anuke.mindustry.Vars.headless;
public class Administration{
public static final int defaultMaxBrokenBlocks = 15;
public static final int defaultBreakCooldown = 1000 * 15;
/**All player info. Maps UUIDs to info. This persists throughout restarts.*/
private ObjectMap<String, PlayerInfo> playerInfo = new ObjectMap<>();

View File

@@ -336,6 +336,12 @@ public class BuildBlock extends Block{
if(pid != -1) previous = content.block(pid);
if(rid != -1) recipe = Recipe.getByResult(content.block(rid));
if(recipe != null){
buildCost = recipe.cost;
}else{
buildCost = 20f;
}
}
}
}

View File

@@ -49,7 +49,7 @@ public class Router extends Block{
public boolean acceptItem(Item item, Tile tile, Tile source){
SplitterEntity entity = tile.entity();
return tile.getTeamID() == source.getTeamID() && entity.lastItem == null;
return tile.getTeamID() == source.getTeamID() && entity.lastItem == null && entity.items.total() == 0;
}
@Override