namespace IPA.Loader.Features { /// /// The root interface for a mod Feature. /// public abstract class Feature { /// /// Initializes the feature with the parameters provided in the definition. /// /// Note: When no parenthesis are provided, is null. /// /// the metadata of the plugin that is being prepared /// the parameters passed to the feature definition, or null /// if the feature is valid for the plugin, otherwise public abstract bool Initialize(PluginLoader.PluginMetadata meta, string[] parameters); /// /// Called before a plugin is loaded. /// /// the plugin about to be loaded /// whether or not the plugin should be loaded public virtual bool BeforeLoad(PluginLoader.PluginMetadata plugin) => true; /// /// Called before a plugin's Init method is called. /// /// the plugin to be initialized /// whether or not to call the Init method public virtual bool BeforeInit(PluginLoader.PluginInfo plugin) => true; /// /// Called after a plugin has been fully initialized, whether or not there is an Init method. /// /// the plugin that was just initialized public virtual void AfterInit(PluginLoader.PluginInfo plugin) { } } }