move DALAMUD_NOT_HAVE_PLUGINS into safeMode check

This commit is contained in:
Raymond 2021-08-31 20:16:17 -04:00
parent 910176914e
commit 9697f0b7a0
2 changed files with 13 additions and 15 deletions

View file

@ -239,8 +239,6 @@ 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;
@ -257,7 +255,6 @@ namespace Dalamud
{ {
Log.Error(ex, "Plugin load failed."); Log.Error(ex, "Plugin load failed.");
} }
}
Service<DalamudInterface>.Set(); Service<DalamudInterface>.Set();
Log.Information("[T3] DUI OK!"); Log.Information("[T3] DUI OK!");

View file

@ -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();