mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 23:04:00 +07:00
Added BE-specific server list
This commit is contained in:
parent
16ddb91466
commit
179bf4d525
@ -54,8 +54,10 @@ public class Vars implements Loadable{
|
||||
public static final String crashReportURL = "http://192.99.169.18/report";
|
||||
/** URL the links to the wiki's modding guide.*/
|
||||
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
|
||||
/** URL to the JSON file containing all the global, public servers. */
|
||||
/** URL to the JSON file containing all the global, public servers. Not queried in BE. */
|
||||
public static final String serverJsonURL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers.json";
|
||||
/** URL to the JSON file containing all the BE servers. Only queried in BE. */
|
||||
public static final String serverJsonBeURL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers_be.json";
|
||||
/** 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";
|
||||
/** list of built-in servers.*/
|
||||
|
@ -117,6 +117,7 @@ public class BeControl{
|
||||
Log.info("&lcAuto-downloading next version...");
|
||||
|
||||
try{
|
||||
//download new file from github
|
||||
Fi source = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
|
||||
Fi dest = source.sibling("server-be-" + updateBuild + ".jar");
|
||||
|
||||
@ -126,6 +127,7 @@ public class BeControl{
|
||||
() -> false,
|
||||
() -> {
|
||||
Log.info("&lcVersion downloaded, exiting. Note that if you are not using the run-server script, the server will not restart automatically.");
|
||||
//replace old file with new
|
||||
dest.copyTo(source);
|
||||
dest.delete();
|
||||
System.exit(2); //this will cause a restart if using the script
|
||||
@ -136,7 +138,6 @@ public class BeControl{
|
||||
}
|
||||
}
|
||||
checkUpdates = false;
|
||||
//todo server updates
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
servers = Core.settings.getObject("server-list", Array.class, Array::new);
|
||||
|
||||
//get servers
|
||||
Core.net.httpGet(serverJsonURL, result -> {
|
||||
Core.net.httpGet(becontrol.active() ? serverJsonBeURL : serverJsonURL, result -> {
|
||||
try{
|
||||
Jval val = Jval.read(result.getResultAsString());
|
||||
Core.app.post(() -> {
|
||||
|
1
servers_be.json
Normal file
1
servers_be.json
Normal file
@ -0,0 +1 @@
|
||||
[]
|
Loading…
Reference in New Issue
Block a user