Added more replacement for turrets/conveyors/junctions/routers

This commit is contained in:
Anuken 2017-11-03 22:32:48 -04:00
parent a27d7e097d
commit 77530b7be3
4 changed files with 17 additions and 1 deletions

View File

@ -43,6 +43,11 @@ public class Turret extends Block{
solid = true;
}
@Override
public boolean canReplace(Block other){
return other instanceof Turret;
}
@Override
public void draw(Tile tile){
Vector2 offset = getPlaceOffset();

View File

@ -27,8 +27,9 @@ public class Conveyor extends Block{
update = true;
}
@Override
public boolean canReplace(Block other){
return other instanceof Conveyor;
return other instanceof Conveyor || other instanceof Router || other instanceof Junction;
}
@Override

View File

@ -13,6 +13,11 @@ public class Junction extends Block{
solid = true;
}
@Override
public boolean canReplace(Block other){
return other instanceof Conveyor || other instanceof Router;
}
@Override
public void handleItem(Tile tile, Item item, Tile source){
int dir = source.relativeTo(tile.x, tile.y);

View File

@ -19,6 +19,11 @@ public class Router extends Block{
solid = true;
}
@Override
public boolean canReplace(Block other){
return other instanceof Junction || other instanceof Conveyor;
}
@Override
public void update(Tile tile){
if(Timers.get(tile, 2) && tile.entity.totalItems() > 0){