mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-25 22:58:47 +07:00
Added more detailed drill tier lists
This commit is contained in:
parent
18b137a1a6
commit
ff07e99e39
@ -274,7 +274,7 @@ text.blocks.inputliquid=Input Liquid
|
||||
text.blocks.inputitem=Input Item
|
||||
text.blocks.inputitems=Input Items
|
||||
text.blocks.outputitem=Output Item
|
||||
text.blocks.drilltier=Drill Tier
|
||||
text.blocks.drilltier=Drillables
|
||||
text.blocks.drillspeed=Base Drill Speed
|
||||
text.blocks.liquidoutput=Liquid Output
|
||||
text.blocks.liquiduse=Liquid Use
|
||||
|
@ -4,10 +4,11 @@ import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.content.fx.Fx;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.meta.BlockStat;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Lines;
|
||||
@ -33,6 +34,16 @@ public class Cultivator extends Drill {
|
||||
drillEffect = Fx.none;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats() {
|
||||
super.setStats();
|
||||
|
||||
stats.remove(BlockStat.drillTier);
|
||||
stats.add(BlockStat.drillTier, table -> {
|
||||
table.addImage("grass1").size(8*3);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Tile tile) {
|
||||
super.update(tile);
|
||||
|
@ -120,8 +120,27 @@ public class Drill extends Block{
|
||||
super.setStats();
|
||||
//TODO add drill speed stats
|
||||
|
||||
stats.add(BlockStat.drillTier, tier, StatUnit.none);
|
||||
stats.add(BlockStat.drillTier, table -> {
|
||||
Array<Item> list = new Array<>();
|
||||
|
||||
for(Item item : Item.all()){
|
||||
if(tier >= item.hardness && Draw.hasRegion(item.name + "1")){
|
||||
list.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < list.size; i++) {
|
||||
Item item = list.get(i);
|
||||
table.addImage(item.name + "1").size(8*3).padRight(2).padLeft(2);
|
||||
if(i != list.size - 1){
|
||||
table.add("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
stats.add(BlockStat.drillSpeed, 60f/drillTime, StatUnit.itemsSecond);
|
||||
if(inputLiquid != null){
|
||||
stats.add(BlockStat.inputLiquid, inputLiquid);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user