mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 08:17:47 +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>
|
/// </summary>
|
||||||
public bool LoadAllApiLevels { get; set; }
|
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>
|
/// <summary>
|
||||||
/// Load a configuration from the provided path.
|
/// Load a configuration from the provided path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,16 @@ namespace Dalamud.Plugin.Internal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadAllPlugins()
|
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 pluginDefs = new List<PluginDef>();
|
||||||
var devPluginDefs = new List<PluginDef>();
|
var devPluginDefs = new List<PluginDef>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue