1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-11 04:57:45 +00:00
sapphire/src/common/Config/ConfigDef.h

95 lines
1.4 KiB
C
Raw Normal View History

#pragma once
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-07 22:11:52 +11:00
struct GlobalConfig
{
2019-01-07 23:16:01 +11:00
Sapphire::Db::ConnectionInfo database;
struct General
{
std::string serverSecret;
std::string dataPath;
2019-01-07 22:11:52 +11:00
uint16_t worldID;
uint8_t defaultGMRank;
2019-01-25 19:00:21 +11:00
uint8_t logLevel;
uint32_t logFilter;
} general;
2019-01-07 22:11:52 +11:00
struct Network
{
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-07 22:11:52 +11:00
struct WorldConfig
{
GlobalConfig global;
struct Network
{
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-07 22:11:52 +11:00
struct Housing
{
2019-01-07 22:11:52 +11:00
std::string defaultEstateName;
} housing;
struct Scripts
{
std::string path;
std::string cachePath;
bool hotSwap;
} scripts;
struct Navigation
{
std::string meshPath;
} navigation;
2019-01-07 22:11:52 +11:00
std::string motd;
bool skipOpening;
2019-01-07 22:11:52 +11:00
};
2019-01-07 22:11:52 +11:00
struct LobbyConfig
{
GlobalConfig global;
2019-01-07 22:11:52 +11:00
struct Network
{
std::string listenIp;
uint16_t listenPort;
2019-01-07 22:11:52 +11:00
} network;
2019-01-07 22:11:52 +11:00
bool allowNoSessionConnect;
std::string worldName;
};
struct ApiConfig
{
GlobalConfig global;
struct Network
{
2019-01-07 22:11:52 +11:00
std::string listenIP;
uint16_t listenPort;
} network;
};
}