2024-07-27 14:35:51 +00:00
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
2024-07-27 14:26:45 +00:00
|
|
|
namespace PkmnLib.Dynamic.ScriptHandling.Registry;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// A plugin is a way to register scripts and other dynamic components to the script registry.
|
|
|
|
/// </summary>
|
2024-07-27 14:35:51 +00:00
|
|
|
[UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)]
|
2024-07-27 14:26:45 +00:00
|
|
|
public abstract class Plugin
|
|
|
|
{
|
2024-08-23 09:15:53 +00:00
|
|
|
protected Plugin(PluginConfiguration configuration)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-07-27 14:26:45 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The name of the plugin. Mostly used for debugging purposes.
|
|
|
|
/// </summary>
|
|
|
|
public abstract string Name { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// When the plugin should be loaded. Lower values are loaded first.
|
|
|
|
/// 0 should be reserved for the core battle scripts.
|
|
|
|
/// </summary>
|
|
|
|
public abstract uint LoadOrder { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Run the registration of the plugin when we're building the library.
|
|
|
|
/// </summary>
|
|
|
|
public abstract void Register(ScriptRegistry registry);
|
2024-08-23 09:15:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public abstract class PluginConfiguration
|
|
|
|
{
|
2024-07-27 14:26:45 +00:00
|
|
|
}
|