Merge branch 'master' of https://github.com/Anuken/Mindustry into 4.0

This commit is contained in:
Anuken
2018-04-28 16:28:58 -04:00
114 changed files with 509 additions and 129 deletions

View File

@@ -8,9 +8,14 @@ import android.os.Build;
import android.os.Bundle;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.utils.Base64Coder;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.security.ProviderInstaller;
import io.anuke.kryonet.DefaultThreadImpl;
import io.anuke.kryonet.KryoClient;
import io.anuke.kryonet.KryoServer;
@@ -119,9 +124,8 @@ public class AndroidLauncher extends AndroidApplication{
return data;
}catch (Exception e){
Settings.defaults("uuid", "");
String uuid = Settings.getString("uuid");
String uuid = Settings.getString("uuid", "");
if(uuid.isEmpty()){
byte[] result = new byte[8];
new Random().nextBytes(result);
@@ -135,6 +139,15 @@ public class AndroidLauncher extends AndroidApplication{
}
};
try {
ProviderInstaller.installIfNeeded(this);
} catch (GooglePlayServicesRepairableException e) {
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
apiAvailability.getErrorDialog(this, e.getConnectionStatusCode(), 0).show();
} catch (GooglePlayServicesNotAvailableException e) {
Log.e("SecurityException", "Google Play Services not available.");
}
if(doubleScaleTablets && isTablet(this.getContext())){
Unit.dp.addition = 0.5f;
}

View File

@@ -26,7 +26,7 @@ public class TextFieldDialogListener extends ClickListener{
}
public static void add(TextField field){
add(field, 0, 15);
add(field, 0, 16);
}
//type - 0 is text, 1 is numbers, 2 is decimals