diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index ca9b125839..88d1f1b532 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -160,7 +160,8 @@ public class Drill extends Block{ public void setStats(){ super.setStats(); - stats.add(Stat.drillTier, StatValues.blocks(b -> b instanceof Floor f && !f.wallOre && f.itemDrop != null && f.itemDrop.hardness <= tier && f.itemDrop != blockedItem)); + stats.add(Stat.drillTier, StatValues.blocks(b -> b instanceof Floor f && !f.wallOre && f.itemDrop != null && + f.itemDrop.hardness <= tier && f.itemDrop != blockedItem && (indexer.isBlockPresent(f) || state.isMenu()))); stats.add(Stat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond); if(liquidBoostIntensity != 1){ diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index 2ae3d1f949..fd6d8b26f6 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -196,15 +196,20 @@ public class StatValues{ }); }); } - public static StatValue content(Seq list){ + return content(list, i -> true); + } + + public static StatValue content(Seq list, Boolf check){ return table -> table.table(l -> { l.left(); + boolean any = false; for(int i = 0; i < list.size; i++){ var item = list.get(i); - if(item instanceof Block block && block.itemDrop != null && !block.itemDrop.unlockedNow()) continue; + if(!check.get(item)) continue; + any = true; if(item.uiIcon.found()) l.image(item.uiIcon).size(iconSmall).padRight(2).padLeft(2).padTop(3).padBottom(3); l.add(item.localizedName).left().padLeft(1).padRight(4).colspan(item.uiIcon.found() ? 1 : 2); @@ -212,11 +217,15 @@ public class StatValues{ l.row(); } } + + if(!any){ + l.add("@none.inmap"); + } }); } public static StatValue blocks(Boolf pred){ - return blocks(content.blocks().select(pred)); + return content(content.blocks(), pred); } public static StatValue blocks(Seq list){