reinit branch
This commit is contained in:
23
OrekiWoofsBees.Common/Configs/ConfigCommandAttribute.cs
Normal file
23
OrekiWoofsBees.Common/Configs/ConfigCommandAttribute.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user