Fixed increased router storage / Fixed instant building after reload
This commit is contained in:
@@ -8,8 +8,6 @@ import io.anuke.ucore.core.Settings;
|
|||||||
import static io.anuke.mindustry.Vars.headless;
|
import static io.anuke.mindustry.Vars.headless;
|
||||||
|
|
||||||
public class Administration{
|
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.*/
|
/**All player info. Maps UUIDs to info. This persists throughout restarts.*/
|
||||||
private ObjectMap<String, PlayerInfo> playerInfo = new ObjectMap<>();
|
private ObjectMap<String, PlayerInfo> playerInfo = new ObjectMap<>();
|
||||||
|
|||||||
@@ -336,6 +336,12 @@ public class BuildBlock extends Block{
|
|||||||
|
|
||||||
if(pid != -1) previous = content.block(pid);
|
if(pid != -1) previous = content.block(pid);
|
||||||
if(rid != -1) recipe = Recipe.getByResult(content.block(rid));
|
if(rid != -1) recipe = Recipe.getByResult(content.block(rid));
|
||||||
|
|
||||||
|
if(recipe != null){
|
||||||
|
buildCost = recipe.cost;
|
||||||
|
}else{
|
||||||
|
buildCost = 20f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class Router extends Block{
|
|||||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||||
SplitterEntity entity = tile.entity();
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user