From 8e6010ad8c563fc95cbc417cc3d9f027558c500b Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 31 Oct 2024 22:32:32 -0400 Subject: [PATCH] Fixed #10305 --- core/src/mindustry/input/InputHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 777511401d..0be2e02705 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -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));