diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index fb9e24eac5..f4cb6aaf4f 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -88,9 +88,11 @@ public class MobileInput extends InputHandler implements GestureListener{ /** Check and assign targets for a specific position. */ void checkTargets(float x, float y){ + if(player.dead()) return; + Unit unit = Units.closestEnemy(player.team(), x, y, 20f, u -> !u.dead); - if(unit != null && !player.dead() && player.unit().type.canAttack){ + if(unit != null && player.unit().type.canAttack){ player.unit().mineTile = null; target = unit; }else{ diff --git a/core/src/mindustry/ui/ItemsDisplay.java b/core/src/mindustry/ui/ItemsDisplay.java index f7e62ded29..dc83f5e54d 100644 --- a/core/src/mindustry/ui/ItemsDisplay.java +++ b/core/src/mindustry/ui/ItemsDisplay.java @@ -30,6 +30,8 @@ public class ItemsDisplay extends Table{ top().left(); margin(0); + if(items == null) return; + table(Tex.button, c -> { c.margin(10).marginLeft(12).marginTop(15f); c.marginRight(12f); diff --git a/core/src/mindustry/ui/dialogs/LaunchLoadoutDialog.java b/core/src/mindustry/ui/dialogs/LaunchLoadoutDialog.java index 1b309e05b6..082b8c134e 100644 --- a/core/src/mindustry/ui/dialogs/LaunchLoadoutDialog.java +++ b/core/src/mindustry/ui/dialogs/LaunchLoadoutDialog.java @@ -89,7 +89,7 @@ public class LaunchLoadoutDialog extends BaseDialog{ total.clear(); selected.requirements().each(total::add); universe.getLaunchResources().each(total::add); - valid = sitems.has(total); + valid = sitems.has(total) || PlanetDialog.debugSelect; }; Cons