Fix player.locale to be default (#4768)

* fix player.locale == default

* Update NetClient.java
This commit is contained in:
Antsiferov Andrew 2021-02-23 22:53:23 +03:00 committed by GitHub
parent 830eb86a0f
commit ad2a18f929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import mindustry.world.*;
import mindustry.world.modules.*;
import java.io.*;
import java.util.*;
import java.util.zip.*;
import static mindustry.Vars.*;
@ -73,9 +74,14 @@ public class NetClient implements ApplicationListener{
disconnectQuietly();
});
String locale = Core.settings.getString("locale");
if(locale.equals("default")){
locale = Locale.getDefault().toString();
}
ConnectPacket c = new ConnectPacket();
c.name = player.name;
c.locale = Core.settings.getString("locale");
c.locale = locale;
c.mods = mods.getModStrings();
c.mobile = mobile;
c.versionType = Version.type;

View File

@ -196,7 +196,7 @@ public class NetServer implements ApplicationListener{
}
if(packet.locale == null){
packet.locale = "en_US";
packet.locale = "en";
}
String ip = con.address;