mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
Try to clean up the end of tile logic
This commit is contained in:
parent
11fc494284
commit
f50ee2ecf2
@ -159,14 +159,12 @@ public class CraterConveyor extends Block implements Autotiler{
|
|||||||
|
|
||||||
if(entity.reload > 0f) return;
|
if(entity.reload > 0f) return;
|
||||||
|
|
||||||
// unload
|
if(entity.blendbit2 == 6){ // unload
|
||||||
if(entity.blendbit2 == 6 && entity.from != tile.pos()){
|
while(true){
|
||||||
while(true) if(!tryDump(tile)) break; // unload as much as possible
|
if(!tryDump(tile)) break;
|
||||||
|
}
|
||||||
if(entity.items.total() == 0) poofOut(tile);
|
if(entity.items.total() == 0) poofOut(tile);
|
||||||
}
|
}else if(shouldLaunch(tile)){ // transfer
|
||||||
|
|
||||||
// transfer
|
|
||||||
if(shouldLaunch(tile)){
|
|
||||||
Tile destination = tile.front();
|
Tile destination = tile.front();
|
||||||
if(destination != null && destination.getTeam() == tile.getTeam() && destination.block() instanceof CraterConveyor){
|
if(destination != null && destination.getTeam() == tile.getTeam() && destination.block() instanceof CraterConveyor){
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user