mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 00:15:33 +01:00
Restructured the config file in preperation for server run modes
This commit is contained in:
@@ -1,20 +1,7 @@
|
||||
package emu.grasscutter;
|
||||
|
||||
public final class Config {
|
||||
public String DispatchServerIp = "127.0.0.1";
|
||||
public String DispatchServerPublicIp = "";
|
||||
public int DispatchServerPort = 443;
|
||||
public String DispatchServerKeystorePath = "./keystore.p12";
|
||||
public String DispatchServerKeystorePassword = "";
|
||||
public Boolean UseSSL = true;
|
||||
|
||||
public String GameServerName = "Test";
|
||||
public String GameServerIp = "127.0.0.1";
|
||||
public String GameServerPublicIp = "";
|
||||
public int GameServerPort = 22102;
|
||||
|
||||
public int UploadLogPort = 80;
|
||||
|
||||
|
||||
public String DatabaseUrl = "mongodb://localhost:27017";
|
||||
public String DatabaseCollection = "grasscutter";
|
||||
|
||||
@@ -23,26 +10,36 @@ public final class Config {
|
||||
public String PACKETS_FOLDER = "./packets/";
|
||||
public String DUMPS_FOLDER = "./dumps/";
|
||||
public String KEY_FOLDER = "./keys/";
|
||||
public boolean LOG_PACKETS = false;
|
||||
|
||||
public GameRates Game = new GameRates();
|
||||
public ServerOptions ServerOptions = new ServerOptions();
|
||||
|
||||
public GameRates getGameRates() {
|
||||
return Game;
|
||||
public GameServerOptions GameServer = new GameServerOptions();
|
||||
public DispatchServerOptions DispatchServer = new DispatchServerOptions();
|
||||
|
||||
public GameServerOptions getGameServerOptions() {
|
||||
return GameServer;
|
||||
}
|
||||
|
||||
public DispatchServerOptions getDispatchOptions() { return DispatchServer; }
|
||||
|
||||
public static class DispatchServerOptions {
|
||||
public String Ip = "127.0.0.1";
|
||||
public String PublicIp = "";
|
||||
public int Port = 443;
|
||||
public int UploadLogPort = 80;
|
||||
public String KeystorePath = "./keystore.p12";
|
||||
public String KeystorePassword = "";
|
||||
public Boolean UseSSL = true;
|
||||
|
||||
public boolean AutomaticallyCreateAccounts = false;
|
||||
}
|
||||
|
||||
public ServerOptions getServerOptions() {
|
||||
return ServerOptions;
|
||||
}
|
||||
|
||||
public static class GameRates {
|
||||
public float ADVENTURE_EXP_RATE = 1.0f;
|
||||
public float MORA_RATE = 1.0f;
|
||||
public float DOMAIN_DROP_RATE = 1.0f;
|
||||
}
|
||||
|
||||
public static class ServerOptions {
|
||||
public static class GameServerOptions {
|
||||
public String Name = "Test";
|
||||
public String Ip = "127.0.0.1";
|
||||
public String PublicIp = "";
|
||||
public int Port = 22102;
|
||||
|
||||
public boolean LOG_PACKETS = false;
|
||||
|
||||
public int InventoryLimitWeapon = 2000;
|
||||
public int InventoryLimitRelic = 2000;
|
||||
public int InventoryLimitMaterial = 2000;
|
||||
@@ -54,6 +51,15 @@ public final class Config {
|
||||
public boolean WatchGacha = false;
|
||||
public int[] WelcomeEmotes = {2007, 1002, 4010};
|
||||
public String WelcomeMotd = "Welcome to Grasscutter emu";
|
||||
public boolean AutomaticallyCreateAccounts = false;
|
||||
|
||||
public GameRates Game = new GameRates();
|
||||
|
||||
public GameRates getGameRates() { return Game; }
|
||||
|
||||
public static class GameRates {
|
||||
public float ADVENTURE_EXP_RATE = 1.0f;
|
||||
public float MORA_RATE = 1.0f;
|
||||
public float DOMAIN_DROP_RATE = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user