2021-11-27 00:53:57 +01:00
|
|
|
#pragma once
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 23:16:01 +11:00
|
|
|
#include <Database/DbCommon.h>
|
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
namespace Sapphire::Common::Config
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
2019-01-07 22:11:52 +11:00
|
|
|
struct GlobalConfig
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
2019-01-07 23:16:01 +11:00
|
|
|
Sapphire::Db::ConnectionInfo database;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 23:26:34 +11:00
|
|
|
struct General
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
|
|
|
std::string serverSecret;
|
|
|
|
std::string dataPath;
|
2019-01-07 22:11:52 +11:00
|
|
|
uint16_t worldID;
|
2019-01-07 23:00:09 +11:00
|
|
|
|
|
|
|
uint8_t defaultGMRank;
|
2019-01-25 19:00:21 +11:00
|
|
|
uint8_t logLevel;
|
|
|
|
uint32_t logFilter;
|
2019-01-07 23:26:34 +11:00
|
|
|
} general;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
struct Network
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
|
|
|
std::string zoneHost;
|
|
|
|
uint16_t zonePort;
|
|
|
|
|
|
|
|
std::string lobbyHost;
|
|
|
|
uint16_t lobbyPort;
|
|
|
|
|
|
|
|
std::string restHost;
|
|
|
|
uint16_t restPort;
|
2019-01-07 22:11:52 +11:00
|
|
|
} network;
|
|
|
|
};
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
struct WorldConfig
|
|
|
|
{
|
|
|
|
GlobalConfig global;
|
|
|
|
|
|
|
|
struct Network
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
|
|
|
std::string listenIp;
|
|
|
|
uint16_t listenPort;
|
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
uint16_t disconnectTimeout;
|
2019-01-28 20:48:33 +11:00
|
|
|
|
|
|
|
float inRangeDistance;
|
2019-01-07 22:11:52 +11:00
|
|
|
} network;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
struct Housing
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
2019-01-07 22:11:52 +11:00
|
|
|
std::string defaultEstateName;
|
|
|
|
} housing;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
|
|
|
struct Scripts
|
|
|
|
{
|
|
|
|
std::string path;
|
|
|
|
std::string cachePath;
|
|
|
|
bool hotSwap;
|
|
|
|
} scripts;
|
|
|
|
|
2019-01-25 12:23:38 +11:00
|
|
|
struct Navigation
|
|
|
|
{
|
|
|
|
std::string meshPath;
|
|
|
|
} navigation;
|
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
std::string motd;
|
2021-12-02 17:34:27 +01:00
|
|
|
bool skipOpening;
|
2019-01-07 22:11:52 +11:00
|
|
|
};
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
struct LobbyConfig
|
|
|
|
{
|
|
|
|
GlobalConfig global;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
struct Network
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
|
|
|
std::string listenIp;
|
|
|
|
uint16_t listenPort;
|
2019-01-07 22:11:52 +11:00
|
|
|
} network;
|
2019-01-06 23:39:30 +11:00
|
|
|
|
2019-01-07 22:11:52 +11:00
|
|
|
bool allowNoSessionConnect;
|
|
|
|
std::string worldName;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ApiConfig
|
|
|
|
{
|
|
|
|
GlobalConfig global;
|
|
|
|
|
|
|
|
struct Network
|
2019-01-06 23:39:30 +11:00
|
|
|
{
|
2019-01-07 22:11:52 +11:00
|
|
|
std::string listenIP;
|
|
|
|
uint16_t listenPort;
|
|
|
|
} network;
|
2019-01-06 23:39:30 +11:00
|
|
|
};
|
|
|
|
}
|