Fix poofing ¬ working if conveyor was backed up
This commit is contained in:
@@ -107,7 +107,6 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
}else{
|
}else{
|
||||||
// poof out crater
|
// poof out crater
|
||||||
if(entity.items.total() == 0){
|
if(entity.items.total() == 0){
|
||||||
Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
|
|
||||||
entity.link = Pos.invalid;
|
entity.link = Pos.invalid;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -129,6 +128,7 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
if(entity.reload < 0.25f){
|
if(entity.reload < 0.25f){
|
||||||
if(!(destination.block() instanceof CraterConveyor) && (entity.link != tile.pos() || !isStart(tile))){ // ...and if its not a crater conveyor, start unloading (everything)
|
if(!(destination.block() instanceof CraterConveyor) && (entity.link != tile.pos() || !isStart(tile))){ // ...and if its not a crater conveyor, start unloading (everything)
|
||||||
while(entity.items.total() > 0 && entity.dominant() != null && offloadDir(tile, entity.dominant())) entity.items.remove(entity.dominant(), 1);
|
while(entity.items.total() > 0 && entity.dominant() != null && offloadDir(tile, entity.dominant())) entity.items.remove(entity.dominant(), 1);
|
||||||
|
if(entity.items.total() == 0) Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,6 +198,13 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int removeStack(Tile tile, Item item, int amount){
|
||||||
|
int i = super.removeStack(tile, item, amount);
|
||||||
|
if(tile.entity.items.total() == 0) Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaximumAccepted(Tile tile, Item item){
|
public int getMaximumAccepted(Tile tile, Item item){
|
||||||
return Mathf.round(super.getMaximumAccepted(tile, item) * tile.entity.timeScale);
|
return Mathf.round(super.getMaximumAccepted(tile, item) * tile.entity.timeScale);
|
||||||
|
|||||||
Reference in New Issue
Block a user