diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index b76a5dbb34..0e84cff407 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -758,8 +758,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ if(req != ignore && !req.breaking && req.block.bounds(req.x, req.y, Tmp.r1).overlaps(type.bounds(x, y, Tmp.r2)) - && !(type.canReplace(req.block) && Tmp.r1.equals(Tmp.r2)) - ){ + && !(type.canReplace(req.block) && Tmp.r1.equals(Tmp.r2))){ return false; } } diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index 24df56c565..36f068a93d 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -217,11 +217,15 @@ public class MobileInput extends InputHandler implements GestureListener{ //actually place/break all selected blocks if(tile != null){ if(!request.breaking){ + if(validPlace(request.x, request.y, request.block, request.rotation)){ + BuildRequest other = getRequest(request.x, request.y); + if(other != null){ + player.buildQueue().remove(other); + } + player.addBuildRequest(request.copy()); + } + rotation = request.rotation; - Block before = block; - block = request.block; - tryPlaceBlock(tile.x, tile.y); - block = before; }else{ tryBreakBlock(tile.x, tile.y); } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SchematicsDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SchematicsDialog.java index 5a556d4138..8ca77f843d 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SchematicsDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SchematicsDialog.java @@ -114,7 +114,7 @@ public class SchematicsDialog extends FloatingDialog{ Label label = c.add(s.name()).style(Styles.outlineLabel).color(Color.white).top().growX().maxWidth(200f - 8f).get(); label.setEllipsis(true); label.setAlignment(Align.center); - }).growX().margin(1).pad(4).maxWidth(200f - 8f).padBottom(0); + }).growX().margin(1).pad(4).maxWidth(Scl.scl(200f - 8f)).padBottom(0); })).size(200f); }, () -> { if(sel[0].childrenPressed()) return;