Rewrite of all static initialization code
This commit is contained in:
@@ -3,8 +3,6 @@ package io.anuke.mindustry.desktop;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -42,9 +40,9 @@ public class CrashHandler {
|
||||
}
|
||||
|
||||
try{
|
||||
JOptionPane.showMessageDialog(null, "An error has occured: \n" + result + "\n\n" +
|
||||
(!failed ? "A crash report has been written to " + new File(filename).getAbsolutePath() + ".\nPlease send this file to the developer!"
|
||||
: "Failed to generate crash report.\nPlease send an image of this crash log to the developer!"));
|
||||
//JOptionPane.showMessageDialog(null, "An error has occured: \n" + result + "\n\n" +
|
||||
// (!failed ? "A crash report has been written to " + new File(filename).getAbsolutePath() + ".\nPlease send this file to the developer!"
|
||||
// : "Failed to generate crash report.\nPlease send an image of this crash log to the developer!"));
|
||||
}catch (Throwable i){
|
||||
i.printStackTrace();
|
||||
//what now?
|
||||
|
||||
@@ -6,14 +6,12 @@ import club.minnced.discord.rpc.DiscordRichPresence;
|
||||
import com.badlogic.gdx.utils.Base64Coder;
|
||||
import io.anuke.kryonet.DefaultThreadImpl;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.core.ThreadHandler.ThreadProvider;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
import io.anuke.mindustry.core.ThreadHandler.ThreadProvider;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
import io.anuke.ucore.util.OS;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.net.NetworkInterface;
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
@@ -26,7 +24,7 @@ import java.util.Random;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class DesktopPlatform extends Platform {
|
||||
final static boolean useDiscord = OS.getPropertyNotNull("sun.arch.data.model").equals("64");
|
||||
final static boolean useDiscord = false;//OS.getPropertyNotNull("sun.arch.data.model").equals("64");
|
||||
final static String applicationId = "398246104468291591";
|
||||
final static DateFormat format = SimpleDateFormat.getDateTimeInstance();
|
||||
String[] args;
|
||||
@@ -52,7 +50,7 @@ public class DesktopPlatform extends Platform {
|
||||
|
||||
@Override
|
||||
public void showError(String text){
|
||||
JOptionPane.showMessageDialog(null, text);
|
||||
//JOptionPane.showMessageDialog(null, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user