mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
move DALAMUD_NOT_HAVE_PLUGINS into safeMode check
This commit is contained in:
parent
910176914e
commit
9697f0b7a0
2 changed files with 13 additions and 15 deletions
|
|
@ -239,24 +239,21 @@ namespace Dalamud
|
||||||
var pluginManager = Service<PluginManager>.Set();
|
var pluginManager = Service<PluginManager>.Set();
|
||||||
Service<CallGate>.Set();
|
Service<CallGate>.Set();
|
||||||
|
|
||||||
if (!bool.Parse(Environment.GetEnvironmentVariable("DALAMUD_NOT_HAVE_PLUGINS") ?? "false"))
|
try
|
||||||
{
|
{
|
||||||
try
|
pluginManager.OnInstalledPluginsChanged += Troubleshooting.LogTroubleshooting;
|
||||||
{
|
|
||||||
pluginManager.OnInstalledPluginsChanged += Troubleshooting.LogTroubleshooting;
|
|
||||||
|
|
||||||
Log.Information("[T3] PM OK!");
|
Log.Information("[T3] PM OK!");
|
||||||
|
|
||||||
pluginManager.CleanupPlugins();
|
pluginManager.CleanupPlugins();
|
||||||
Log.Information("[T3] PMC OK!");
|
Log.Information("[T3] PMC OK!");
|
||||||
|
|
||||||
pluginManager.LoadAllPlugins();
|
pluginManager.LoadAllPlugins();
|
||||||
Log.Information("[T3] PML OK!");
|
Log.Information("[T3] PML OK!");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.Error(ex, "Plugin load failed.");
|
Log.Error(ex, "Plugin load failed.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Service<DalamudInterface>.Set();
|
Service<DalamudInterface>.Set();
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@ namespace Dalamud.Plugin.Internal
|
||||||
if (!this.devPluginDirectory.Exists)
|
if (!this.devPluginDirectory.Exists)
|
||||||
this.devPluginDirectory.Create();
|
this.devPluginDirectory.Create();
|
||||||
|
|
||||||
if (this.SafeMode = configuration.PluginSafeMode)
|
var noPlugins = bool.Parse(Environment.GetEnvironmentVariable("DALAMUD_NOT_HAVE_PLUGINS") ?? "false");
|
||||||
|
if (this.SafeMode = noPlugins || configuration.PluginSafeMode)
|
||||||
{
|
{
|
||||||
configuration.PluginSafeMode = false;
|
configuration.PluginSafeMode = false;
|
||||||
configuration.Save();
|
configuration.Save();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue