Skip to content

Commit

Permalink
0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LaoHuaJiOfficial committed Sep 28, 2024
1 parent 3a9656c commit 51beaf9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/newhorizon/expand/block/env/DataFloorPlacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import arc.graphics.g2d.Draw;
import arc.scene.ui.Button;
import arc.scene.ui.ButtonGroup;
import arc.scene.ui.Image;
import arc.scene.ui.ScrollPane;
import arc.scene.ui.layout.Table;
import arc.util.io.Reads;
Expand Down Expand Up @@ -114,7 +115,7 @@ public void buildConfiguration(Table table){
tileDataSelect.clear();
tileDataSelectTable.clear();
if (terrainBlock == null) {
tileDataSelectTable.label(() -> "<N/A>");
tileDataSelectTable.label(() -> " < N / A > ");
}else {
for (int i = 0; i < terrainBlock.maxSize; i++){
int finalI = i;
Expand Down
12 changes: 5 additions & 7 deletions src/newhorizon/expand/block/production/drill/AdaptDrill.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import mindustry.world.Block;
import mindustry.world.Tile;
import mindustry.world.blocks.environment.Floor;
import mindustry.world.blocks.environment.StaticWall;
import mindustry.world.meta.*;
import newhorizon.content.NHStats;
import newhorizon.expand.block.consumer.PowerConsumer;
Expand Down Expand Up @@ -116,10 +117,6 @@ public void load() {
@Override
public void setBars(){
barMap.clear();
addBar("aaa", (AdaptDrillBuild e) -> new Bar("aaa", Pal.techBlue, () -> e.warmup));
addBar("ccc", (AdaptDrillBuild e) -> new Bar("eee", Pal.techBlue, e::efficiency));


addBar("health", e -> new BarExtend(Core.bundle.format("nh.bar.health", e.health(), health, Strings.autoFixed(e.healthf() * 100, 0)), Pal.health, e::healthf, Iconc.add + "").blink(Color.white));
addBar("power", (AdaptDrillBuild e) -> new BarExtend(
Core.bundle.format("nh.bar.power-detail", Strings.autoFixed(e.getPowerCons() * 60f, 0), Strings.autoFixed((e.powerConsMul), 1), e.powerConsExtra),
Expand Down Expand Up @@ -148,8 +145,9 @@ public void setStats(){
table.table(c -> {
int i = 0;
for(Block block : content.blocks()){
if (block.itemDrop == null || (!mineOres.contains(block.itemDrop) || block.itemDrop.hardness > mineTier)) continue;
if ((block instanceof Floor && ((Floor) block).wallOre)) continue;
if (block.itemDrop == null) continue;
if (!(mineOres.contains(block.itemDrop) || block.itemDrop.hardness < mineTier)) continue;
if ((block instanceof Floor && ((Floor) block).wallOre) || block instanceof StaticWall) continue;

c.table(Styles.grayPanel, b -> {
b.image(block.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
Expand Down Expand Up @@ -259,7 +257,7 @@ protected void countOre(Tile tile) {
protected boolean canMine(Tile tile){
if(tile == null || tile.block().isStatic()) return false;
Item drops = tile.drop();
return drops != null && (mineOres.contains(drops) || drops.hardness > mineTier);
return drops != null && (mineOres.contains(drops) || drops.hardness < mineTier);
}

protected Item getDrop(Tile tile){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import mindustry.type.Category;
import mindustry.type.Item;
import newhorizon.content.NHColor;
import newhorizon.content.NHItems;

import static mindustry.type.ItemStack.with;
import static newhorizon.util.func.NHFunc.rand;
Expand All @@ -24,11 +25,11 @@ public class ResonanceDrill extends AdaptDrill {
public ResonanceDrill() {
super("resonance-mining-facility");
requirements(Category.production, with(Items.copper, 40, Items.lead, 48, Items.titanium, 32));
mineOres.add(new Item[]{Items.sand, Items.scrap, Items.copper, Items.lead, Items.coal, Items.titanium, Items.beryllium});
mineOres.add(new Item[]{Items.sand, Items.scrap, Items.copper, Items.lead, Items.coal, Items.titanium, Items.beryllium, Items.thorium, Items.tungsten, NHItems.zeta});

mineSpeed = 5f;
mineCount = 3;
mineTier = 3;
mineTier = 5;

powerConsBase = 0f;

Expand Down

0 comments on commit 51beaf9

Please sign in to comment.