Community server fetch logging

This commit is contained in:
Anuken 2020-12-01 09:39:30 -05:00
parent 11168efffa
commit 448fef980b
3 changed files with 57 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package mindustry.ui.dialogs; package mindustry.ui.dialogs;
import arc.*; import arc.*;
import arc.Net.*;
import arc.graphics.*; import arc.graphics.*;
import arc.input.*; import arc.input.*;
import arc.math.*; import arc.math.*;
@ -501,9 +502,16 @@ public class JoinDialog extends BaseDialog{
Core.settings.remove("server-list"); Core.settings.remove("server-list");
} }
var url = becontrol.active() ? serverJsonBeURL : serverJsonV6URL;
Log.info("Fetching community servers at @", url);
//get servers //get servers
Core.net.httpGet(becontrol.active() ? serverJsonBeURL : serverJsonV6URL, result -> { Core.net.httpGet(url, result -> {
try{ try{
if(result.getStatus() != HttpStatus.OK){
Log.warn("Failed to fetch community servers: @", result.getStatus());
return;
}
Jval val = Jval.read(result.getResultAsString()); Jval val = Jval.read(result.getResultAsString());
Core.app.post(() -> { Core.app.post(() -> {
@ -519,8 +527,8 @@ public class JoinDialog extends BaseDialog{
} }
defaultServers.add(new ServerGroup(name, addresses)); defaultServers.add(new ServerGroup(name, addresses));
}); });
Log.info("Fetched @ global servers.", defaultServers.size); Log.info("Fetched @ community servers.", defaultServers.size);
}catch(Throwable ignored){ }catch(Throwable e){
Log.err("Failed to parse community servers."); Log.err("Failed to parse community servers.");
} }
}); });

View File

@ -0,0 +1,23 @@
[This is a truncated changelog, see Github for full notes]
After more than 9 months of development, 6.0 is finally here. There have been far too many changes to reasonably list here, so I'll go over the highlights.
Units:
- The unit system has been completely reworked
- All unit sprites have been re-drawn and cleaned up
- Many new unit types have been added
- Player-specific pads and unit-specific factories have been removed
Campaign:
Maps:

View File

@ -0,0 +1,23 @@
[This is a truncated changelog, see Github for full notes]
After more than 9 months of development, 6.0 is finally here. There have been far too many changes to reasonably list here, so I'll go over the highlights.
Units:
- The unit system has been completely reworked
- All unit sprites have been re-drawn and cleaned up
- Many new unit types have been added
- Player-specific pads and unit-specific factories have been removed
Campaign:
Maps: