Private
Public Access
1
0
Files
OrekiWoofsBeehives/OrekiWoofsBees.Common/Configs/ConfigCommandAttribute.cs
2026-03-11 02:01:27 +01:00

24 lines
776 B
C#

using System;
namespace OrekiWoofsBees.Common.Configs;
/// <summary>
/// Marks a Config property as having a /beehives or .beehives chat command.
/// The registration loop in ChatCommands.cs picks these up.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ConfigCommandAttribute(bool serverSide) : Attribute
{
/// <summary>True = registered as a server command and broadcasts on change.</summary>
public bool ServerSide { get; } = serverSide;
/// <summary>Inclusive</summary>
public double Min { get; set; }
/// <summary>Inclusive</summary>
public double Max { get; set; }
/// <remarks>Allowed values for string enum properties (uses OptionalWordRange).</remarks>
public string[] AllowedValues { get; set; } = [];
}