mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 01:44:22 +07:00
Fixed #10305
This commit is contained in:
parent
2a7e564603
commit
8e6010ad8c
@ -1996,7 +1996,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
|
||||
public boolean validPlace(int x, int y, Block type, int rotation, @Nullable BuildPlan ignore, boolean ignoreUnits){
|
||||
if(player.unit().plans.size > 0){
|
||||
if(player.isBuilder() && player.unit().plans.size > 0){
|
||||
Tmp.r1.setCentered(x * tilesize + type.offset, y * tilesize + type.offset, type.size * tilesize);
|
||||
plansOut.clear();
|
||||
playerPlanTree.intersect(Tmp.r1, plansOut);
|
||||
@ -2020,6 +2020,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
|
||||
public void breakBlock(int x, int y){
|
||||
if(!player.isBuilder()) return;
|
||||
|
||||
Tile tile = world.tile(x, y);
|
||||
if(tile != null && tile.build != null) tile = tile.build.tile;
|
||||
player.unit().addBuild(new BuildPlan(tile.x, tile.y));
|
||||
|
Loading…
Reference in New Issue
Block a user