diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 7c3344b4a1..00509484bd 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="35" + android:versionName="3.1b2" > diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 7235d7ded5..956d798436 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -9,7 +9,7 @@ import io.anuke.mindustry.entities.Player; import io.anuke.ucore.scene.ui.layout.Unit; public class Vars{ - public static final boolean testAndroid = true; + public static final boolean testAndroid = false; //shorthand for whether or not this is running on android public static final boolean android = (Gdx.app.getType() == ApplicationType.Android) || testAndroid; //shorthand for whether or not this is running on GWT diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index f9d5633da2..5bf4101825 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -108,8 +108,7 @@ public class Control extends Module{ "pause", Keys.SPACE, "dash", Keys.SHIFT_LEFT, "rotate_right", Keys.R, - "rotate_left", Keys.E, - "area_delete_mode", Keys.Q + "rotate_left", Keys.E ); for(int i = 0; i < Vars.saveSlots; i ++){ diff --git a/core/src/io/anuke/mindustry/core/Tutorial.java b/core/src/io/anuke/mindustry/core/Tutorial.java index cf3572bdd6..91f9eb5de0 100644 --- a/core/src/io/anuke/mindustry/core/Tutorial.java +++ b/core/src/io/anuke/mindustry/core/Tutorial.java @@ -330,8 +330,8 @@ public class Tutorial{ blockPlaceX = 2; blockPlaceY = -2; text = !Vars.android ? - "You can delete blocks by holding the [orange]right mouse button[] on the block you want to delete. Try deleting this conveyor.": - "You can delete blocks by [orange]tapping and holding[] on the block you want to delete. Try deleting this conveyor."; + "You can delete blocks by clicking the [orange]right mouse button[] on the block you want to delete. Try deleting this conveyor.": + "You can delete blocks by [orange]selecting the crosshair[] in the [orange]break mode menu[] in the bottom left and tapping a block. Try deleting this conveyor."; } }, /* @@ -645,7 +645,7 @@ public class Tutorial{ }, end{ { - text = "And that concludes the tutorial! Good luck!"; + text = "And that concludes the tutorial! Good luck!"; canBack = false; } }; diff --git a/core/src/io/anuke/mindustry/input/DesktopInput.java b/core/src/io/anuke/mindustry/input/DesktopInput.java index aa03a10692..4bf42182d7 100644 --- a/core/src/io/anuke/mindustry/input/DesktopInput.java +++ b/core/src/io/anuke/mindustry/input/DesktopInput.java @@ -21,6 +21,7 @@ import io.anuke.ucore.util.Mathf; public class DesktopInput extends InputHandler{ int mousex, mousey; int endx, endy; + private boolean enableHold = false; @Override public float getCursorEndX(){ return endx; } @Override public float getCursorEndY(){ return endy; } @@ -29,7 +30,7 @@ public class DesktopInput extends InputHandler{ @Override public boolean touchDown (int screenX, int screenY, int pointer, int button){ - if(button == Buttons.LEFT){ + if((button == Buttons.LEFT && player.recipe != null) || (button == Buttons.RIGHT)){ Vector2 vec = Graphics.world(screenX, screenY); mousex = (int)vec.x; mousey = (int)vec.y; @@ -38,7 +39,11 @@ public class DesktopInput extends InputHandler{ } public boolean touchUp(int screenX, int screenY, int pointer, int button){ - player.placeMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY()); + if(button == Buttons.LEFT){ + player.placeMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY()); + }else if(button == Buttons.RIGHT){ + player.breakMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY()); + } return false; } @@ -46,10 +51,11 @@ public class DesktopInput extends InputHandler{ public void update(){ if(player.isDead()) return; - if(!Inputs.buttonDown(Buttons.LEFT)){ + if(!Inputs.buttonDown(Buttons.LEFT) && !Inputs.buttonDown(Buttons.RIGHT)){ mousex = (int)Graphics.mouseWorld().x; mousey = (int)Graphics.mouseWorld().y; } + endx = Gdx.input.getX(); endy = Gdx.input.getY(); @@ -69,10 +75,10 @@ public class DesktopInput extends InputHandler{ player.rotation ++; } - if(Inputs.keyDown("area_delete_mode")){ - player.placeMode = PlaceMode.areaDelete; + if(Inputs.buttonDown(Buttons.RIGHT)){ + player.breakMode = PlaceMode.areaDelete; }else{ - player.placeMode = PlaceMode.hold; + player.breakMode = PlaceMode.hold; } player.rotation = Mathf.mod(player.rotation, 4); @@ -105,7 +111,7 @@ public class DesktopInput extends InputHandler{ } //block breaking - if(Inputs.buttonDown(Buttons.RIGHT) && cursor != null && validBreak(tilex(), tiley())){ + if(enableHold && Inputs.buttonDown(Buttons.RIGHT) && cursor != null && validBreak(tilex(), tiley())){ Tile tile = cursor; player.breaktime += Timers.delta(); if(player.breaktime >= tile.getBreakTime()){