119 lines
4.3 KiB
C#
Raw Normal View History

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-08-12 18:02:43 +08:00
public class Settings
2021-07-07 13:36:25 +02:00
{
2022-07-01 13:54:18 +08:00
/// <summary>
/// Port to listen for incoming connections
/// </summary>
public int Port { get; set; } = 4499;
2022-07-09 11:36:04 +08:00
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-09 11:36:04 +08:00
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-09 11:36:04 +08:00
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-09 11:36:04 +08:00
/// <summary>
/// The website address to be shown on master server
/// </summary>
public string Website { get; set; } = "https://ragecoop.online/";
/// <summary>
/// The description to be shown on master server
/// </summary>
public string Description { get; set; } = "RAGECOOP server";
/// <summary>
/// The game mode to be shown on master server
/// </summary>
public string GameMode { get; set; } = "FreeRoam";
/// <summary>
/// The language to be shown on master server
/// </summary>
public string Language { get; set; } = "English";
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-09 11:36:04 +08:00
2022-07-01 13:54:18 +08:00
/// <summary>
/// Whether or not to announce this server so it'll appear on server list.
2022-07-01 13:54:18 +08:00
/// </summary>
public bool AnnounceSelf { get; set; } = false;
2022-07-09 11:36:04 +08:00
2022-07-01 13:54:18 +08:00
/// <summary>
/// Master server address, mostly doesn't need to be changed.
2022-07-01 13:54:18 +08:00
/// </summary>
2022-07-11 12:01:12 +08:00
public string MasterServer { get; set; } = "https://masterserver.ragecoop.online/";
2022-06-24 18:25:24 +08:00
/// <summary>
/// See <see cref="Core.Logger.LogLevel"/>.
/// </summary>
2022-08-19 21:43:23 +08:00
public int LogLevel { get; set; } = 0;
2022-07-09 11:36:04 +08:00
2022-05-30 11:11:40 +08:00
/// <summary>
/// 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-02 12:39:50 +08:00
public float NpcStreamingDistance { get; set; } = 500 ;
2022-07-09 11:36:04 +08:00
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;
2022-07-10 16:13:08 +08:00
/// <summary>
2022-07-12 17:10:16 +08:00
/// If enabled, all clients will have same weather and time as host
2022-07-10 16:13:08 +08:00
/// </summary>
2022-07-12 17:10:16 +08:00
public bool WeatherTimeSync { get; set; } = true;
2022-07-31 20:56:51 +08:00
/// <summary>
/// List of all allowed username characters
/// </summary>
2022-08-01 16:56:32 +08:00
public string AllowedUsernameChars { get; set; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_";
2022-08-08 17:03:41 +08:00
/// <summary>
2022-08-12 18:02:43 +08:00
/// Whether to use direct connection between players to send entity information, <see cref="UseZeroTier"/> needs to be enabled if on WAN for this feature to function properly.
2022-08-08 17:03:41 +08:00
/// </summary>
2022-08-10 20:42:47 +08:00
public bool UseP2P { get; set; } = false;
2022-08-12 18:02:43 +08:00
/// <summary>
/// Whether to enable zerotier VLAN functionality, allowing you to host a server behind NAT firewall, no port forward required.
/// </summary>
public bool UseZeroTier { get; set; } = false;
2022-08-13 00:52:34 +02:00
/// <summary>
/// Use in-game voice chat to communicate with other players
/// </summary>
public bool UseVoice { get; set; } = false;
2022-08-12 18:02:43 +08:00
/// <summary>
/// The zerotier network id to join, default value is zerotier's public Earth network.
/// </summary>
2022-08-20 22:22:06 +08:00
public string ZeroTierNetworkID { get; set; } = "8056c2e21c000001";
/// <summary>
/// Automatically update to nightly build when an update is avalible, check is performed every 10 minutes.
/// </summary>
public bool AutoUpdate { get; set; } = false;
2022-08-22 00:23:46 +08:00
2022-08-21 12:37:37 +08:00
/// <summary>
2022-08-22 00:23:46 +08:00
/// Kick godmode and spamming assholes
2022-08-21 12:37:37 +08:00
/// </summary>
2022-08-22 00:23:46 +08:00
public bool AntiAssholes { get; set; } = true;
2021-07-07 13:36:25 +02:00
}
}