Code/Tikfinity/Configuration/TikfinitySettings.cs
using System.Collections.Generic;
using Sandbox;
namespace TikfinitySbox;
[AssetType( Name = "TikFinity Settings", Extension = "tikfinity", Category = "Streaming" )]
public sealed class TikfinitySettings : GameResource
{
[Property, Group( "Connection" )] public string Endpoint { get; set; } = "ws://127.0.0.1:21213/";
[Property, Group( "Connection" ), Range( 1024, 262144 )] public int MaxMessageBytes { get; set; } = 65536;
[Property, Group( "Connection" ), Range( 0.25f, 60f )] public float InitialReconnectSeconds { get; set; } = 1f;
[Property, Group( "Connection" ), Range( 1f, 300f )] public float MaxReconnectSeconds { get; set; } = 30f;
[Property, Group( "Safety" ), Range( 1, 4096 )] public int MaxPendingMessages { get; set; } = 256;
[Property, Group( "Safety" ), Range( 1, 128 )] public int MaxMessagesPerFrame { get; set; } = 16;
[Property, Group( "Safety" ), Range( 1, 240 )] public int GlobalEventsPerSecond { get; set; } = 30;
[Property, Group( "Safety" ), Range( 1, 120 )] public int UserEventsPerSecond { get; set; } = 10;
[Property, Group( "Safety" ), Range( 1, 1000 )] public int MaxAmountPerInteraction { get; set; } = 100;
[Property, Group( "Safety" ), Range( 1f, 120f )] public float DuplicateWindowSeconds { get; set; } = 12f;
[Property, Group( "Safety" ), Range( 64, 8192 )] public int MaxDuplicateEntries { get; set; } = 2048;
[Property, Group( "Safety" )] public bool WaitForGiftStreakEnd { get; set; } = true;
[Property, Group( "Routing" )] public bool BroadcastPresentationToClients { get; set; } = true;
[Property, Group( "Routing" )] public bool DebugLogging { get; set; }
[Property, Group( "Routing" )] public List<TikfinityGiftRule> GiftRules { get; set; } = new();
}