24 lines
776 B
C#
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; } = [];
|
|
}
|