Config.java 2.46 KB
Newer Older
Melledy's avatar
Melledy committed
1
2
package emu.grasscutter;

3
4
import java.util.ArrayList;

KingRainbow44's avatar
KingRainbow44 committed
5
public final class Config {
6

Melledy's avatar
Melledy committed
7
8
	public String DatabaseUrl = "mongodb://localhost:27017";
	public String DatabaseCollection = "grasscutter";
Jaida Wu's avatar
Jaida Wu committed
9

Melledy's avatar
Melledy committed
10
11
12
13
14
	public String RESOURCE_FOLDER = "./resources/";
	public String DATA_FOLDER = "./data/";
	public String PACKETS_FOLDER = "./packets/";
	public String DUMPS_FOLDER = "./dumps/";
	public String KEY_FOLDER = "./keys/";
15

16
	public String RunMode = "HYBRID"; // HYBRID, DISPATCH_ONLY, GAME_ONLY
17
18
19
20
21
	public GameServerOptions GameServer = new GameServerOptions();
	public DispatchServerOptions DispatchServer = new DispatchServerOptions();

	public GameServerOptions getGameServerOptions() {
		return GameServer;
Melledy's avatar
Melledy committed
22
	}
23
24
25
26

	public DispatchServerOptions getDispatchOptions() { return DispatchServer; }

	public static class DispatchServerOptions {
27
28
		public String Ip = "0.0.0.0";
		public String PublicIp = "127.0.0.1";
29
30
31
32
33
34
		public int Port = 443;
		public String KeystorePath = "./keystore.p12";
		public String KeystorePassword = "";
		public Boolean UseSSL = true;

		public boolean AutomaticallyCreateAccounts = false;
35
36
37
38
39
40
41
42
43
44
45
46
47

		public RegionInfo[] GameServers = {};

		public RegionInfo[] getGameServers() {
			return GameServers;
		}

		public static class RegionInfo {
			public String Name = "os_usa";
			public String Title = "Test";
			public String Ip = "127.0.0.1";
			public int Port = 22102;
		}
Melledy's avatar
Melledy committed
48
49
	}
	
50
51
	public static class GameServerOptions {
		public String Name = "Test";
52
53
		public String Ip = "0.0.0.0";
		public String PublicIp = "127.0.0.1";
54
55
		public int Port = 22102;

56
57
58
		public String DispatchServerDatabaseUrl = "mongodb://localhost:27017";
		public String DispatchServerDatabaseCollection = "grasscutter";

59
60
		public boolean LOG_PACKETS = false;

61
62
63
64
65
66
67
		public int InventoryLimitWeapon = 2000;
		public int InventoryLimitRelic = 2000;
		public int InventoryLimitMaterial = 2000;
		public int InventoryLimitFurniture = 2000;
		public int InventoryLimitAll = 30000;
		public int MaxAvatarsInTeam = 4;
		public int MaxAvatarsInTeamMultiplayer = 4;
KingRainbow44's avatar
KingRainbow44 committed
68
		public int MaxEntityLimit = 1000; // Max entity limit per world. // TODO: Enforce later.
69
		public boolean WatchGacha = false;
Melledy's avatar
Melledy committed
70
71
		public int[] WelcomeEmotes = {2007, 1002, 4010};
		public String WelcomeMotd = "Welcome to Grasscutter emu";
72
73
74
75
76
77
78
79
80
81

		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;
		}
Melledy's avatar
Melledy committed
82
83
	}
}