Log # of fetched servers; cleanup

This commit is contained in:
Anuken
2019-11-22 16:13:09 -05:00
parent c324dce034
commit f28eb4027c
2 changed files with 5 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ public class Vars implements Loadable{
/** URL the links to the wiki's modding guide.*/ /** URL the links to the wiki's modding guide.*/
public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?template=bug_report.md"; public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?template=bug_report.md";
/** list of built-in servers.*/ /** list of built-in servers.*/
public static final Array<String> defaultServers = Array.with(/*"mins.us.to"*/); public static final Array<String> defaultServers = Array.with();
/** maximum distance between mine and core that supports automatic transferring */ /** maximum distance between mine and core that supports automatic transferring */
public static final float mineTransferRange = 220f; public static final float mineTransferRange = 220f;
/** team of the player by default */ /** team of the player by default */

View File

@@ -369,14 +369,11 @@ public class JoinDialog extends FloatingDialog{
try{ try{
defaultServers.clear(); defaultServers.clear();
val.asArray().each(child -> defaultServers.add(child.getString("address", "<invalid>"))); val.asArray().each(child -> defaultServers.add(child.getString("address", "<invalid>")));
}catch(Throwable t){ Log.info("Fetched {0} global servers.", defaultServers.size);
t.printStackTrace(); }catch(Throwable ignored){}
}
}); });
}catch(Throwable t){ }catch(Throwable ignored){}
t.printStackTrace(); }, t -> {});
}
}, Throwable::printStackTrace);
} }
private void saveServers(){ private void saveServers(){