Full error localization

This commit is contained in:
Anuken 2018-10-28 23:50:30 -04:00
parent 108e5a2f5e
commit 5b01d923d3
2 changed files with 4 additions and 1 deletions

View file

@ -266,6 +266,7 @@ text.error.unreachable = Server unreachable.
text.error.invalidaddress = Invalid address.
text.error.timedout = Timed out!\nMake sure the host has port forwarding set up, and that the address is correct!
text.error.mismatch = Packet error:\npossible client/server version mismatch.\nMake sure you and the host have the latest version of Mindustry!
text.error.alreadyconnected = Already connected.
text.error.any = Unkown network error.
text.settings.language = Language

View file

@ -69,6 +69,8 @@ public class Net{
error = Bundles.get("text.error.unreachable");
}else if(type.contains("timeout")){
error = Bundles.get("text.error.timeout");
}else if(error.equals("alreadyconnected")){
error = Bundles.get("text.error.alreadyconnected");
}else if(!error.isEmpty()){
error = Bundles.get("text.error.any");
}
@ -112,7 +114,7 @@ public class Net{
active = true;
server = false;
}else{
throw new IOException("Already connected!");
throw new IOException("alreadyconnected");
}
}catch(IOException e){
showError(e);