Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more of LocalPlugin to ExposedPlugin #2177

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 67 additions & 1 deletion Dalamud/Plugin/InstalledPluginState.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Plugin.Internal.Types;
using Dalamud.Plugin.Internal.Types;
using Dalamud.Plugin.Internal.Types.Manifest;

namespace Dalamud.Plugin;

Expand All @@ -22,6 +23,47 @@ public interface IExposedPlugin
/// </summary>
bool IsLoaded { get; }

/// <summary>
/// Gets a value indicating whether this plugin's API level is out of date.
/// </summary>
bool IsOutdated { get; }

/// <summary>
/// Gets a value indicating whether the plugin is for testing use only.
/// </summary>
bool IsTesting { get; }

/// <summary>
/// Gets a value indicating whether or not this plugin is orphaned(belongs to a repo) or not.
/// </summary>
bool IsOrphaned { get; }

/// <summary>
/// Gets a value indicating whether or not this plugin is serviced(repo still exists, but plugin no longer does).
/// </summary>
bool IsDecommissioned { get; }

/// <summary>
/// Gets a value indicating whether this plugin has been banned.
/// </summary>
bool IsBanned { get; }

/// <summary>
/// Gets a value indicating whether this plugin is dev plugin.
/// </summary>
bool IsDev { get; }

/// <summary>
/// Gets a value indicating whether this manifest is associated with a plugin that was installed from a third party
/// repo.
/// </summary>
bool IsThirdParty { get; }

/// <summary>
/// Gets the plugin manifest.
/// </summary>
ILocalPluginManifest Manifest { get; }

/// <summary>
/// Gets the version of the plugin.
/// </summary>
Expand Down Expand Up @@ -74,6 +116,30 @@ internal sealed class ExposedPlugin(LocalPlugin plugin) : IExposedPlugin
/// <inheritdoc/>
public bool HasConfigUi => plugin.DalamudInterface?.LocalUiBuilder.HasConfigUi ?? false;

/// <inheritdoc/>
public bool IsOutdated => plugin.IsOutdated;

/// <inheritdoc/>
public bool IsTesting => plugin.IsTesting;

/// <inheritdoc/>
public bool IsOrphaned => plugin.IsOrphaned;

/// <inheritdoc/>
public bool IsDecommissioned => plugin.IsDecommissioned;

/// <inheritdoc/>
public bool IsBanned => plugin.IsBanned;

/// <inheritdoc/>
public bool IsDev => plugin.IsDev;

/// <inheritdoc/>
public bool IsThirdParty => plugin.IsThirdParty;

/// <inheritdoc/>
public ILocalPluginManifest Manifest => plugin.Manifest;

/// <inheritdoc/>
public void OpenMainUi()
{
Expand Down
Loading