2022-05-22 15:55:26 +08:00
|
|
|
|
namespace RageCoop.Server
|
2021-07-07 13:36:25 +02:00
|
|
|
|
{
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Settings for RageCoop Server
|
|
|
|
|
/// </summary>
|
2022-06-24 18:25:24 +08:00
|
|
|
|
public class ServerSettings
|
2021-07-07 13:36:25 +02:00
|
|
|
|
{
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Port to listen for incoming connections
|
|
|
|
|
/// </summary>
|
2021-12-11 14:32:06 +01:00
|
|
|
|
public int Port { get; set; } = 4499;
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum number of players on this server
|
|
|
|
|
/// </summary>
|
2022-06-01 17:57:54 +08:00
|
|
|
|
public int MaxPlayers { get; set; } = 32;
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum latency allowed for a client, a client will be kicked if it's latency it's higher than this value
|
|
|
|
|
/// </summary>
|
2022-06-01 17:57:27 +08:00
|
|
|
|
public int MaxLatency { get; set; } = 500;
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The server name to be shown on master server
|
|
|
|
|
/// </summary>
|
2022-04-06 02:18:24 +02:00
|
|
|
|
public string Name { get; set; } = "RAGECOOP server";
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The message to send when a client connected (not visible to others)
|
|
|
|
|
/// </summary>
|
2021-07-07 13:36:25 +02:00
|
|
|
|
public string WelcomeMessage { get; set; } = "Welcome on this server :)";
|
2022-07-01 13:54:18 +08:00
|
|
|
|
// public bool HolePunch { get; set; } = true;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether or not to announce this server so that it'll appear on server list.
|
|
|
|
|
/// </summary>
|
2021-12-08 14:46:07 +01:00
|
|
|
|
public bool AnnounceSelf { get; set; } = false;
|
2022-07-01 13:54:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Master server address, mostly doesn't to be changed.
|
|
|
|
|
/// </summary>
|
2022-06-03 16:28:02 +08:00
|
|
|
|
public string MasterServer { get; set; } = "[AUTO]";
|
2022-06-24 18:25:24 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// See <see cref="Core.Logger.LogLevel"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int LogLevel=2;
|
2022-05-30 11:11:40 +08:00
|
|
|
|
/// <summary>
|
2022-05-30 14:32:38 +08:00
|
|
|
|
/// NPC data won't be sent to a player if their distance is greater than this value. -1 for unlimited.
|
2022-05-30 11:11:40 +08:00
|
|
|
|
/// </summary>
|
2022-07-01 13:54:18 +08:00
|
|
|
|
public float NpcStreamingDistance { get; set; } = 500;
|
2022-05-30 11:11:40 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Player's data won't be sent to another player if their distance is greater than this value. -1 for unlimited.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public float PlayerStreamingDistance { get; set; } = -1;
|
2021-07-07 13:36:25 +02:00
|
|
|
|
}
|
|
|
|
|
}
|