Disabled mobile debug / Added no-core error message
This commit is contained in:
@@ -27,7 +27,7 @@ import io.anuke.ucore.util.OS;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Vars{
|
||||
public static final boolean testMobile = true;
|
||||
public static final boolean testMobile = false;
|
||||
//shorthand for whether or not this is running on android or ios
|
||||
public static boolean mobile;
|
||||
public static boolean ios;
|
||||
|
||||
@@ -126,7 +126,9 @@ public class Logic extends Module {
|
||||
Timers.update();
|
||||
}
|
||||
|
||||
checkGameOver();
|
||||
if(!world.isInvalidMap()){
|
||||
checkGameOver();
|
||||
}
|
||||
|
||||
if(!state.is(State.paused) || Net.active()){
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.ObjectMap;
|
||||
import io.anuke.mindustry.ai.BlockIndexer;
|
||||
import io.anuke.mindustry.ai.Pathfinder;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.EventType.TileChangeEvent;
|
||||
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
||||
import io.anuke.mindustry.io.*;
|
||||
@@ -34,7 +35,7 @@ public class World extends Module{
|
||||
private Maps maps = new Maps();
|
||||
|
||||
private Array<Tile> tempTiles = new ThreadArray<>();
|
||||
private boolean generating;
|
||||
private boolean generating, invalidMap;
|
||||
|
||||
public World(){
|
||||
maps.load();
|
||||
@@ -56,7 +57,11 @@ public class World extends Module{
|
||||
public Pathfinder pathfinder(){
|
||||
return pathfinder;
|
||||
}
|
||||
|
||||
|
||||
public boolean isInvalidMap() {
|
||||
return invalidMap;
|
||||
}
|
||||
|
||||
public boolean solid(int x, int y){
|
||||
Tile tile = tile(x, y);
|
||||
|
||||
@@ -216,6 +221,14 @@ public class World extends Module{
|
||||
|
||||
WorldGenerator.loadTileData(tiles, MapIO.readTileData(map, true), map.meta.hasOreGen(), seed);
|
||||
|
||||
if(!headless && state.teams.get(players[0].getTeam()).cores.size == 0){
|
||||
ui.showError("$text.map.nospawn");
|
||||
threads.runDelay(() -> state.set(State.menu));
|
||||
invalidMap = true;
|
||||
}else{
|
||||
invalidMap = false;
|
||||
}
|
||||
|
||||
endMapLoad();
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
FloatingDialog dialog = new FloatingDialog("$text.play");
|
||||
dialog.addCloseButton();
|
||||
dialog.content().defaults().height(70f).width(w).padRight(5f);
|
||||
dialog.content().defaults().height(66f).width(w).padRight(5f);
|
||||
|
||||
dialog.content().add(new MenuButton("icon-play-2", "$text.newgame", () -> {
|
||||
dialog.hide();
|
||||
|
||||
Reference in New Issue
Block a user