mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: add PluginSafeMode
This commit is contained in:
parent
d05a259efc
commit
35aadbe575
2 changed files with 16 additions and 0 deletions
|
|
@ -184,6 +184,12 @@ namespace Dalamud.Configuration.Internal
|
|||
/// </summary>
|
||||
public bool LoadAllApiLevels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not any plugin should be loaded when the game is started.
|
||||
/// It is reset immediately when read.
|
||||
/// </summary>
|
||||
public bool PluginSafeMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Load a configuration from the provided path.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -159,6 +159,16 @@ namespace Dalamud.Plugin.Internal
|
|||
/// </summary>
|
||||
public void LoadAllPlugins()
|
||||
{
|
||||
if (this.dalamud.Configuration.PluginSafeMode)
|
||||
{
|
||||
Log.Information("PluginSafeMode was enabled, not loading any plugins.");
|
||||
|
||||
this.dalamud.Configuration.PluginSafeMode = false;
|
||||
this.dalamud.Configuration.Save();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var pluginDefs = new List<PluginDef>();
|
||||
var devPluginDefs = new List<PluginDef>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue