2.0.9
This commit is contained in:
@@ -16,6 +16,18 @@ public class PluginLoader:IVisionBuilderModule
|
||||
public List<IPlugin> Plugins { get; } = new List<IPlugin>();
|
||||
|
||||
private bool _isInitialized;
|
||||
|
||||
|
||||
|
||||
private string _pluginsProfile = "enabled_plugins.txt";
|
||||
|
||||
public void InitializeModule(string? pluginsProfile)
|
||||
{
|
||||
if (pluginsProfile != null)
|
||||
_pluginsProfile = pluginsProfile + ".txt";
|
||||
InitializeModule();
|
||||
}
|
||||
|
||||
public void InitializeModule()
|
||||
{
|
||||
if (_isInitialized)
|
||||
@@ -27,7 +39,7 @@ public class PluginLoader:IVisionBuilderModule
|
||||
Log.Information("Loading plugins...");
|
||||
var pluginsPath = Path.Combine("..", "Data", PLUGINS_DIRECTORY);
|
||||
|
||||
var enabledPluginsPath = Path.Combine(pluginsPath, "enabled_plugins.txt");
|
||||
var enabledPluginsPath = Path.Combine(pluginsPath, _pluginsProfile);
|
||||
if (!File.Exists(enabledPluginsPath))
|
||||
{
|
||||
Log.Warning("Enabled plugins file not found: {EnabledPluginsPath}. All discovered plugins will be disabled by default.", enabledPluginsPath);
|
||||
|
||||
Reference in New Issue
Block a user