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

KingRainbow44's avatar
KingRainbow44 committed
3
public final class Config {
4

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

Melledy's avatar
Melledy committed
8
9
10
11
12
	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/";
KingRainbow44's avatar
KingRainbow44 committed
13
	public String PLUGINS_FOLDER = "./plugins/";
14

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

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

	public DispatchServerOptions getDispatchOptions() { return DispatchServer; }

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

		public boolean AutomaticallyCreateAccounts = false;
memetrollsXD's avatar
memetrollsXD committed
36
		public String[] defaultPermissions = new String[] { "" };
37
38
39
40
41
42
43
44
45
46
47
48
49

		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
50
51
	}
	
52
53
	public static class GameServerOptions {
		public String Name = "Test";
54
55
		public String Ip = "0.0.0.0";
		public String PublicIp = "127.0.0.1";
56
		public int Port = 22102;
xtaodada's avatar
xtaodada committed
57
		public int PublicPort = 0;
58

59
60
61
		public String DispatchServerDatabaseUrl = "mongodb://localhost:27017";
		public String DispatchServerDatabaseCollection = "grasscutter";

62
63
		public boolean LOG_PACKETS = false;

64
65
66
67
68
69
70
		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
71
		public int MaxEntityLimit = 1000; // Max entity limit per world. // TODO: Enforce later.
72
		public boolean WatchGacha = false;
Melledy's avatar
Melledy committed
73
74
		public int[] WelcomeEmotes = {2007, 1002, 4010};
		public String WelcomeMotd = "Welcome to Grasscutter emu";
memetrollsXD's avatar
memetrollsXD committed
75
76
		public String WelcomeMailContent = "Hi there!\r\nFirst of all, welcome to Grasscutter. If you have any issues, please let us know so that Lawnmower can help you! \r\n\r\nCheck out our:\r\n<type=\"browser\" text=\"Discord\" href=\"https://discord.gg/T5vZU6UyeG\"/> <type=\"browser\" text=\"GitHub\" href=\"https://github.com/Melledy/Grasscutter\"/>";
		public int[] WelcomeMailItems = {13509};
77

Kengxxiao's avatar
Kengxxiao committed
78
		public boolean EnableOfficialShop = true;
79
80
81
82
83
84
85
86
87
88

		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
89
90
	}
}