Launch only when full
This commit is contained in:
@@ -83,26 +83,29 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
|
Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
|
||||||
entity.crater = null;
|
entity.crater = null;
|
||||||
}else{
|
}else{
|
||||||
Tile destination = tile.front();
|
|
||||||
|
|
||||||
if(entity.crater.dst(tile) < 1.25f){
|
if(entity.items.total() >= getMaximumAccepted(tile, entity.crater.i) || !Track.start.check.get(tile)){
|
||||||
entity.crater.f = tile.rotation() * 90 - 90;
|
Tile destination = tile.front();
|
||||||
if(!(destination.block() instanceof CraterConveyor)){
|
|
||||||
while(entity.items.total() > 0 && entity.crater.i != null && offloadDir(tile, entity.crater.i)) entity.items.remove(entity.crater.i, 1);
|
|
||||||
|
|
||||||
|
if(entity.crater.dst(tile) < 1.25f){
|
||||||
|
entity.crater.f = tile.rotation() * 90 - 90;
|
||||||
|
if(!(destination.block() instanceof CraterConveyor)){
|
||||||
|
while(entity.items.total() > 0 && entity.crater.i != null && offloadDir(tile, entity.crater.i)) entity.items.remove(entity.crater.i, 1);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(entity.crater.dst(tile) < 0.1f){
|
if(entity.crater.dst(tile) < 0.1f){
|
||||||
if(destination.block() instanceof CraterConveyor){
|
if(destination.block() instanceof CraterConveyor){
|
||||||
CraterConveyorEntity e = destination.ent();
|
CraterConveyorEntity e = destination.ent();
|
||||||
|
|
||||||
if(e.crater == null){
|
if(e.crater == null){
|
||||||
e.crater = entity.crater;
|
e.crater = entity.crater;
|
||||||
entity.crater = null;
|
entity.crater = null;
|
||||||
|
|
||||||
e.items.addAll(entity.items);
|
e.items.addAll(entity.items);
|
||||||
entity.items.clear();
|
entity.items.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,6 +174,11 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaximumAccepted(Tile tile, Item item){
|
||||||
|
return Mathf.round(super.getMaximumAccepted(tile, item) * tile.entity.timeScale);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean blendsArmored(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ // only connect to compressable blocks
|
public boolean blendsArmored(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ // only connect to compressable blocks
|
||||||
return super.blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock) && otherblock.compressable;
|
return super.blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock) && otherblock.compressable;
|
||||||
|
|||||||
Reference in New Issue
Block a user