Changed tunnel acceptance algorithm
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Wed Mar 28 09:37:55 EDT 2018
|
||||
#Fri Mar 30 18:03:34 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=477
|
||||
androidBuildCode=478
|
||||
name=Mindustry
|
||||
code=3.5
|
||||
build=custom build
|
||||
|
||||
@@ -71,19 +71,7 @@ public class TunnelConveyor extends Block{
|
||||
@Override
|
||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||
TunnelEntity entity = tile.entity();
|
||||
|
||||
if(entity.index >= entity.buffer.length - 1) return false;
|
||||
|
||||
int rot = source.relativeTo(tile.x, tile.y);
|
||||
if(rot != (tile.getRotation() + 2)%4) return false;
|
||||
Tile tunnel = getDestTunnel(tile, item);
|
||||
|
||||
if(tunnel != null){
|
||||
Tile to = tunnel.getNearby(tunnel.getRotation());
|
||||
return to != null && to.block().acceptItem(item, to, tunnel);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
return entity.index < entity.buffer.length - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user