From c249485a4fc265fc578339a611d33e6def0942e9 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 3 Nov 2019 13:04:27 -0500 Subject: [PATCH] Mobile schematic fixes --- core/src/io/anuke/mindustry/input/MobileInput.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index 9c97b8287f..66a4c0a513 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -219,11 +219,17 @@ public class MobileInput extends InputHandler implements GestureListener{ if(!request.breaking){ if(validPlace(request.x, request.y, request.block, request.rotation)){ BuildRequest other = getRequest(request.x, request.y, request.block.size, null); + BuildRequest copy = request.copy(); + + if(copy.hasConfig && copy.block.posConfig){ + copy.config = Pos.get(Pos.x(copy.config) + copy.x - copy.originalX, Pos.y(copy.config) + copy.y - copy.originalY); + } + if(other == null){ - player.addBuildRequest(request.copy()); + player.addBuildRequest(copy); }else if(!other.breaking && other.x == request.x && other.y == request.y && other.block.size == request.block.size){ player.buildQueue().remove(other); - player.addBuildRequest(request.copy()); + player.addBuildRequest(copy); } }