Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -1262,24 +1262,27 @@ public class Blocks implements ContentList{
|
||||
|
||||
mechanicalDrill = new Drill("mechanical-drill"){{
|
||||
requirements(Category.production, with(Items.copper, 12), true);
|
||||
drawMineItem = true;
|
||||
tier = 2;
|
||||
drillTime = 600;
|
||||
size = 2;
|
||||
drawMineItem = true;
|
||||
|
||||
consumes.liquid(Liquids.water, 0.05f).boost();
|
||||
}};
|
||||
|
||||
pneumaticDrill = new Drill("pneumatic-drill"){{
|
||||
requirements(Category.production, with(Items.copper, 18, Items.graphite, 10));
|
||||
drawMineItem = true;
|
||||
tier = 3;
|
||||
drillTime = 400;
|
||||
size = 2;
|
||||
drawMineItem = true;
|
||||
|
||||
consumes.liquid(Liquids.water, 0.06f).boost();
|
||||
}};
|
||||
|
||||
laserDrill = new Drill("laser-drill"){{
|
||||
requirements(Category.production, with(Items.copper, 35, Items.graphite, 30, Items.silicon, 30, Items.titanium, 20));
|
||||
drawMineItem = true;
|
||||
drillTime = 280;
|
||||
size = 3;
|
||||
hasPower = true;
|
||||
@@ -1293,6 +1296,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
blastDrill = new Drill("blast-drill"){{
|
||||
requirements(Category.production, with(Items.copper, 65, Items.silicon, 60, Items.titanium, 50, Items.thorium, 75));
|
||||
drawMineItem = true;
|
||||
drillTime = 280;
|
||||
size = 4;
|
||||
drawRim = true;
|
||||
|
||||
@@ -37,6 +37,11 @@ public class BlockForge extends PayloadAcceptor{
|
||||
consumes.add(new ConsumeItemDynamic((BlockForgeBuild e) -> e.recipe != null ? e.recipe.requirements : ItemStack.empty));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureRegion[] icons(){
|
||||
return new TextureRegion[]{region, outRegion};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBars(){
|
||||
super.setBars();
|
||||
|
||||
@@ -31,6 +31,11 @@ public class BlockLoader extends PayloadAcceptor{
|
||||
rotate = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureRegion[] icons(){
|
||||
return new TextureRegion[]{region, inRegion, outRegion, topRegion};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return false;
|
||||
@@ -72,7 +77,7 @@ public class BlockLoader extends PayloadAcceptor{
|
||||
//draw input
|
||||
for(int i = 0; i < 4; i++){
|
||||
if(blends(i) && i != rotation){
|
||||
Draw.rect(inRegion, x, y, i * 90);
|
||||
Draw.rect(inRegion, x, y, (i * 90) - 180);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ public class Drill extends Block{
|
||||
public @Load("@-rim") TextureRegion rimRegion;
|
||||
public @Load("@-rotator") TextureRegion rotatorRegion;
|
||||
public @Load("@-top") TextureRegion topRegion;
|
||||
public @Load(value = "@-item", fallback = "drill-item-@size") TextureRegion itemRegion;
|
||||
|
||||
public Drill(String name){
|
||||
super(name);
|
||||
@@ -80,7 +81,7 @@ public class Drill extends Block{
|
||||
if(returnItem == null || !drawMineItem) return;
|
||||
|
||||
Draw.color(returnItem.color);
|
||||
Draw.rect("drill-top", req.drawx(), req.drawy());
|
||||
Draw.rect(itemRegion, req.drawx(), req.drawy());
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@@ -124,6 +125,12 @@ public class Drill extends Block{
|
||||
Draw.rect(returnItem.icon(Cicon.small), dx, dy - 1);
|
||||
Draw.reset();
|
||||
Draw.rect(returnItem.icon(Cicon.small), dx, dy);
|
||||
|
||||
if(drawMineItem){
|
||||
Draw.color(returnItem.color);
|
||||
Draw.rect(itemRegion, tile.worldx() + offset, tile.worldy() + offset);
|
||||
Draw.color();
|
||||
}
|
||||
}else{
|
||||
Tile to = tile.getLinkedTilesAs(this, tempTiles).find(t -> t.drop() != null && t.drop().hardness > tier);
|
||||
Item item = to == null ? null : to.drop();
|
||||
@@ -304,7 +311,7 @@ public class Drill extends Block{
|
||||
|
||||
if(dominantItem != null && drawMineItem){
|
||||
Draw.color(dominantItem.color);
|
||||
Draw.rect("drill-top", x, y);
|
||||
Draw.rect(itemRegion, x, y);
|
||||
Draw.color();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Reconstructor extends UnitBlock{
|
||||
|
||||
@Override
|
||||
public TextureRegion[] icons(){
|
||||
return new TextureRegion[]{region, outRegion, topRegion};
|
||||
return new TextureRegion[]{region, inRegion, outRegion, topRegion};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +129,7 @@ public class Reconstructor extends UnitBlock{
|
||||
//draw input
|
||||
for(int i = 0; i < 4; i++){
|
||||
if(blends(i) && i != rotation){
|
||||
Draw.rect(inRegion, x, y, i * 90);
|
||||
Draw.rect(inRegion, x, y, (i * 90) - 180);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user