Added more replacement for turrets/conveyors/junctions/routers
This commit is contained in:
@@ -43,6 +43,11 @@ public class Turret extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canReplace(Block other){
|
||||||
|
return other instanceof Turret;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Tile tile){
|
public void draw(Tile tile){
|
||||||
Vector2 offset = getPlaceOffset();
|
Vector2 offset = getPlaceOffset();
|
||||||
|
|||||||
@@ -27,8 +27,9 @@ public class Conveyor extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canReplace(Block other){
|
public boolean canReplace(Block other){
|
||||||
return other instanceof Conveyor;
|
return other instanceof Conveyor || other instanceof Router || other instanceof Junction;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ public class Junction extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canReplace(Block other){
|
||||||
|
return other instanceof Conveyor || other instanceof Router;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleItem(Tile tile, Item item, Tile source){
|
public void handleItem(Tile tile, Item item, Tile source){
|
||||||
int dir = source.relativeTo(tile.x, tile.y);
|
int dir = source.relativeTo(tile.x, tile.y);
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ public class Router extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canReplace(Block other){
|
||||||
|
return other instanceof Junction || other instanceof Conveyor;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
if(Timers.get(tile, 2) && tile.entity.totalItems() > 0){
|
if(Timers.get(tile, 2) && tile.entity.totalItems() > 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user