mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-22 02:07:20 +07:00
Added more replacement for turrets/conveyors/junctions/routers
This commit is contained in:
parent
a27d7e097d
commit
77530b7be3
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user