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