Debug mode now activated with command line arguments
This commit is contained in:
@@ -43,6 +43,12 @@ public class Control extends RendererModule{
|
|||||||
float respawntime;
|
float respawntime;
|
||||||
|
|
||||||
public Control(){
|
public Control(){
|
||||||
|
String[] args = Mindustry.args;
|
||||||
|
|
||||||
|
if(args.length > 0 && args[0].equals("-debug")){
|
||||||
|
Vars.debug = true;
|
||||||
|
}
|
||||||
|
|
||||||
cameraScale = baseCameraScale;
|
cameraScale = baseCameraScale;
|
||||||
pixelate();
|
pixelate();
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package io.anuke.mindustry;
|
|||||||
import io.anuke.ucore.modules.Core;
|
import io.anuke.ucore.modules.Core;
|
||||||
|
|
||||||
public class Mindustry extends Core {
|
public class Mindustry extends Core {
|
||||||
|
public static String[] args = {};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.anuke.mindustry.entities.Player;
|
|||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||||
|
|
||||||
public class Vars{
|
public class Vars{
|
||||||
|
|
||||||
//shorthand for whether or not this is running on android
|
//shorthand for whether or not this is running on android
|
||||||
public static final boolean android = (Gdx.app.getType() == ApplicationType.Android);
|
public static final boolean android = (Gdx.app.getType() == ApplicationType.Android);
|
||||||
//how far away from the player blocks can be placed
|
//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
|
//how much the zoom changes every zoom button press
|
||||||
public static final int zoomScale = Math.round(Unit.dp.inPixels(1));
|
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
|
//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
|
//number of save slots-- increasing may lead to layout issues
|
||||||
public static final int saveSlots = 4;
|
public static final int saveSlots = 4;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import io.anuke.mindustry.io.SaveIO;
|
|||||||
import io.anuke.mindustry.io.SaveIO.FormatProvider;
|
import io.anuke.mindustry.io.SaveIO.FormatProvider;
|
||||||
|
|
||||||
public class DesktopLauncher {
|
public class DesktopLauncher {
|
||||||
|
|
||||||
public static void main (String[] arg) {
|
public static void main (String[] arg) {
|
||||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||||
config.setTitle("Mindustry");
|
config.setTitle("Mindustry");
|
||||||
@@ -26,6 +27,8 @@ public class DesktopLauncher {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Mindustry.args = arg;
|
||||||
|
|
||||||
new Lwjgl3Application(new Mindustry(), config);
|
new Lwjgl3Application(new Mindustry(), config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user