Deukhoofd 2533512eda
All checks were successful
Build / Build (push) Successful in 51s
Slight cleanup, do some TODOs
2025-06-22 10:42:25 +02:00

27 lines
719 B
C#

using PkmnLib.Static.Utils;
namespace PkmnLib.Dynamic.ScriptHandling.Registry;
/// <summary>
/// Helper attribute to register scripts through reflection.
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false), MeansImplicitUse]
public class ScriptAttribute : Attribute
{
/// <summary>
/// The category of the script it should be registered in.
/// </summary>
public ScriptCategory Category { get; }
/// <summary>
/// The name of the script.
/// </summary>
public StringKey Name { get; }
/// <inheritdoc cref="ScriptAttribute"/>
public ScriptAttribute(ScriptCategory category, string name)
{
Category = category;
Name = name;
}
}