mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: still show outdated plugins with a warning
This commit is contained in:
parent
dd41c77148
commit
83edcc583f
2 changed files with 24 additions and 0 deletions
|
|
@ -614,6 +614,12 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
}
|
||||
}
|
||||
|
||||
// Outdated API level
|
||||
if (plugin.Manifest.DalamudApiLevel < PluginManager.DalamudApiLevel)
|
||||
{
|
||||
label += Locs.PluginTitleMod_OutdatedError;
|
||||
}
|
||||
|
||||
if (ImGui.CollapsingHeader($"{label}###Header{index}{plugin.Manifest.InternalName}"))
|
||||
{
|
||||
var manifest = plugin.Manifest;
|
||||
|
|
@ -644,6 +650,13 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.TextWrapped(manifest.Description);
|
||||
}
|
||||
|
||||
if (plugin.Manifest.DalamudApiLevel < PluginManager.DalamudApiLevel)
|
||||
{
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||
ImGui.TextWrapped(Locs.PluginBody_Outdated);
|
||||
ImGui.PopStyleColor();
|
||||
}
|
||||
|
||||
// Available commands (if loaded)
|
||||
if (plugin.IsLoaded)
|
||||
{
|
||||
|
|
@ -681,6 +694,9 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
// Disable everything if the updater is running or another plugin is operating
|
||||
var disabled = this.updateStatus == OperationStatus.InProgress || this.installStatus == OperationStatus.InProgress;
|
||||
|
||||
// Disable everything if the plugin is outdated
|
||||
disabled = disabled || plugin.Manifest.DalamudApiLevel < PluginManager.DalamudApiLevel;
|
||||
|
||||
if (plugin.State == PluginState.InProgress)
|
||||
{
|
||||
ImGuiComponents.DisabledButton(Locs.PluginButton_Working);
|
||||
|
|
@ -1062,6 +1078,8 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
|
||||
public static string PluginTitleMod_UnloadError => Loc.Localize("InstallerUnloadError", " (unload error)");
|
||||
|
||||
public static string PluginTitleMod_OutdatedError => Loc.Localize("InstallerOutdatedError", " (outdated)");
|
||||
|
||||
#endregion
|
||||
|
||||
#region Plugin context menu
|
||||
|
|
@ -1082,6 +1100,8 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
|
||||
public static string PluginBody_DeleteDevPlugin => Loc.Localize("InstallerDeleteDevPlugin ", " To delete this plugin, please remove it from the devPlugins folder.");
|
||||
|
||||
public static string PluginBody_Outdated => Loc.Localize("InstallerOutdatedPluginBody ", "This plugin is outdated and incompatible at the moment. Please wait for it to be updated by its author.");
|
||||
|
||||
#endregion
|
||||
|
||||
#region Plugin buttons
|
||||
|
|
|
|||
|
|
@ -469,6 +469,10 @@ namespace Dalamud.Plugin.Internal
|
|||
{
|
||||
Log.Information(ex, $"Dev plugin failed to load, adding anyways: {dllFile.Name}");
|
||||
}
|
||||
else if (plugin.Manifest.DalamudApiLevel < DalamudApiLevel)
|
||||
{
|
||||
Log.Information(ex, $"Plugin was outdated, adding anyways: {dllFile.Name}");
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginLocations.Remove(plugin.AssemblyName.FullName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue