mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
feat: add "Load banned plugins" option to dev menu
This commit is contained in:
parent
47428d5c03
commit
d06a7efff8
3 changed files with 13 additions and 1 deletions
|
|
@ -207,6 +207,11 @@ 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 banned plugins should be loaded.
|
||||||
|
/// </summary>
|
||||||
|
public bool LoadBannedPlugins { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether or not any plugin should be loaded when the game is started.
|
/// 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.
|
/// It is reset immediately when read.
|
||||||
|
|
|
||||||
|
|
@ -624,6 +624,12 @@ namespace Dalamud.Interface.Internal
|
||||||
configuration.Save();
|
configuration.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Load banned plugins", null, configuration.LoadBannedPlugins))
|
||||||
|
{
|
||||||
|
configuration.LoadBannedPlugins = !configuration.LoadBannedPlugins;
|
||||||
|
configuration.Save();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
ImGui.MenuItem("API Level:" + PluginManager.DalamudApiLevel, false);
|
ImGui.MenuItem("API Level:" + PluginManager.DalamudApiLevel, false);
|
||||||
ImGui.MenuItem("Loaded plugins:" + pluginManager.InstalledPlugins.Count, false);
|
ImGui.MenuItem("Loaded plugins:" + pluginManager.InstalledPlugins.Count, false);
|
||||||
|
|
|
||||||
|
|
@ -952,7 +952,8 @@ namespace Dalamud.Plugin.Internal
|
||||||
/// <returns>A value indicating whether the plugin/manifest has been banned.</returns>
|
/// <returns>A value indicating whether the plugin/manifest has been banned.</returns>
|
||||||
public bool IsManifestBanned(PluginManifest manifest)
|
public bool IsManifestBanned(PluginManifest manifest)
|
||||||
{
|
{
|
||||||
return this.bannedPlugins.Any(ban => ban.Name == manifest.InternalName && ban.AssemblyVersion >= manifest.AssemblyVersion);
|
var configuration = Service<DalamudConfiguration>.Get();
|
||||||
|
return configuration.LoadBannedPlugins || this.bannedPlugins.Any(ban => ban.Name == manifest.InternalName && ban.AssemblyVersion >= manifest.AssemblyVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue