using System;
namespace UXAssist.Common.ModFeatures;
///
/// Marks a class as a mod feature so that can discover it.
/// Lifecycle methods (Init, Start, Uninit, OnInputUpdate, OnUpdate)
/// are optional and are skipped if missing.
///
///
///
/// Timing contract (same as ): Init runs eagerly at
/// discovery time, synchronously inside , normally during the
/// registering mod's BepInEx Awake phase. This is the phase where early setup such as keybind
/// registration must run. A late-discovered feature can initialize after the host lifecycle has begun.
/// Start runs once during the host mod's (UXAssist) Start.
/// If a feature is discovered after that lifecycle has already begun, the registry starts it immediately
/// after Init. The per-frame methods are called by UXAssist with at most one invocation per frame.
///
///
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ModFeatureAttribute : Attribute
{
///
/// Optional display name of the feature.
///
public string Name { get; }
///
/// Execution order among discovered static features. Lower values run first.
///
public int Order { get; set; }
///
/// Initializes a new instance of the class.
///
/// Optional display name of the feature.
public ModFeatureAttribute(string name = null)
{
Name = name;
}
}