diff --git a/core/src/io/anuke/mindustry/Control.java b/core/src/io/anuke/mindustry/Control.java index 1369335efc..c3ee486bfc 100644 --- a/core/src/io/anuke/mindustry/Control.java +++ b/core/src/io/anuke/mindustry/Control.java @@ -43,6 +43,12 @@ public class Control extends RendererModule{ float respawntime; public Control(){ + String[] args = Mindustry.args; + + if(args.length > 0 && args[0].equals("-debug")){ + Vars.debug = true; + } + cameraScale = baseCameraScale; pixelate(); diff --git a/core/src/io/anuke/mindustry/Mindustry.java b/core/src/io/anuke/mindustry/Mindustry.java index e07cf5bdf9..ba1783eef6 100644 --- a/core/src/io/anuke/mindustry/Mindustry.java +++ b/core/src/io/anuke/mindustry/Mindustry.java @@ -3,6 +3,7 @@ package io.anuke.mindustry; import io.anuke.ucore.modules.Core; public class Mindustry extends Core { + public static String[] args = {}; @Override public void init(){ diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index f45f1628d7..1a3fa8f008 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -7,6 +7,7 @@ import io.anuke.mindustry.entities.Player; import io.anuke.ucore.scene.ui.layout.Unit; public class Vars{ + //shorthand for whether or not this is running on android public static final boolean android = (Gdx.app.getType() == ApplicationType.Android); //how far away from the player blocks can be placed @@ -24,7 +25,7 @@ public class Vars{ //how much the zoom changes every zoom button press public static final int zoomScale = Math.round(Unit.dp.inPixels(1)); //if true, player speed will be increased, massive amounts of resources will be given on start, and other debug options will be available - public static boolean debug = true; + public static boolean debug = false; //number of save slots-- increasing may lead to layout issues public static final int saveSlots = 4; diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index 2bc63f2308..7a34e6146a 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -11,6 +11,7 @@ import io.anuke.mindustry.io.SaveIO; import io.anuke.mindustry.io.SaveIO.FormatProvider; public class DesktopLauncher { + public static void main (String[] arg) { Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration(); config.setTitle("Mindustry"); @@ -26,6 +27,8 @@ public class DesktopLauncher { } }); + Mindustry.args = arg; + new Lwjgl3Application(new Mindustry(), config); } }