Merge branch 'master' of https://github.com/Anuken/Mindustry into rendering-optimizations

# Conflicts:
#	core/assets/sprites/sprites.atlas
#	core/assets/sprites/sprites.png
#	core/src/io/anuke/mindustry/core/Renderer.java
#	core/src/io/anuke/mindustry/entities/units/types/Drone.java
#	core/src/io/anuke/mindustry/graphics/CacheLayer.java
#	core/src/io/anuke/mindustry/world/blocks/Floor.java
This commit is contained in:
Anuken
2018-11-26 13:23:38 -05:00
109 changed files with 1495 additions and 1370 deletions

View File

@@ -32,6 +32,7 @@ public class DefaultKeybinds{
"menu", Gdx.app.getType() == ApplicationType.Android ? Input.BACK : Input.ESCAPE,
"pause", Input.SPACE,
"toggle_menus", Input.C,
"screenshot", Input.P,
new Category("multiplayer"),
"player_list", Input.TAB,
"chat", Input.ENTER,

View File

@@ -193,7 +193,7 @@ public abstract class InputHandler extends InputAdapter{
}
//call tapped event
if(tile.getTeam() == player.getTeam()){
if(!consumed && tile.getTeam() == player.getTeam()){
Call.onTileTapped(player, tile);
}

View File

@@ -230,7 +230,7 @@ public class MobileInput extends InputHandler implements GestureListener{
player.clearBuilding();
mode = none;
recipe = null;
}).visible(() -> player.isBuilding() || recipe != null);
}).visible(() -> player.isBuilding() || recipe != null || mode == breaking);
//confirm button
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
@@ -528,7 +528,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//ignore off-screen taps
if(cursor == null || ui.hasMouse(x, y)) return false;
threads.run(() -> checkTargets(worldx, worldy));
checkTargets(worldx, worldy);
//remove if request present
if(hasRequest(cursor)){
@@ -548,14 +548,13 @@ public class MobileInput extends InputHandler implements GestureListener{
consumed = true;
player.dropCarry(); //drop off unit
}else{
threads.run(() -> {
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);
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;
Effects.effect(Fx.select, unit.getX(), unit.getY());
}
});
if(unit != null){
consumed = true;
player.moveTarget = unit;
Effects.effect(Fx.select, unit.getX(), unit.getY());
}
}
}