From bc6bbdbbe0b8e883035eac61cdb7c087dc76d0ef Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 22 Sep 2018 12:29:27 -0400 Subject: [PATCH] Fixed not being able to move units on conveyors --- core/src/io/anuke/mindustry/input/MobileInput.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index e66100f521..eaf99540a9 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -562,18 +562,25 @@ public class MobileInput extends InputHandler implements GestureListener{ //add to selection queue if it's a valid BREAK position cursor = cursor.target(); selection.add(new PlaceRequest(cursor.worldx(), cursor.worldy())); - }else if(!tileTapped(cursor.target()) && !canTapPlayer(worldx, worldy) && !tryBeginMine(cursor)){ + }else if(!canTapPlayer(worldx, worldy)){ + boolean consumed = false; //else, try and carry units if(player.getCarry() != null){ + consumed = true; player.dropCarry(); //drop off unit }else{ Unit unit = Units.getClosest(player.getTeam(), Graphics.world(x, y).x, Graphics.world(x, y).y, 4f, u -> !u.isFlying() && u.getMass() <= player.mech.carryWeight); if(unit != null){ player.moveTarget = unit; + consumed = true; Effects.effect(Fx.select, unit.getX(), unit.getY()); } } + + if(!consumed && !tileTapped(cursor.target())){ + tryBeginMine(cursor); + } } return false;