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());
|
||||
entity.crater = null;
|
||||
}else{
|
||||
Tile destination = tile.front();
|
||||
|
||||
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.items.total() >= getMaximumAccepted(tile, entity.crater.i) || !Track.start.check.get(tile)){
|
||||
Tile destination = tile.front();
|
||||
|
||||
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(destination.block() instanceof CraterConveyor){
|
||||
CraterConveyorEntity e = destination.ent();
|
||||
if(entity.crater.dst(tile) < 0.1f){
|
||||
if(destination.block() instanceof CraterConveyor){
|
||||
CraterConveyorEntity e = destination.ent();
|
||||
|
||||
if(e.crater == null){
|
||||
e.crater = entity.crater;
|
||||
entity.crater = null;
|
||||
if(e.crater == null){
|
||||
e.crater = entity.crater;
|
||||
entity.crater = null;
|
||||
|
||||
e.items.addAll(entity.items);
|
||||
entity.items.clear();
|
||||
e.items.addAll(entity.items);
|
||||
entity.items.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,6 +174,11 @@ public class CraterConveyor extends BaseConveyor{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumAccepted(Tile tile, Item item){
|
||||
return Mathf.round(super.getMaximumAccepted(tile, item) * tile.entity.timeScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user