mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
allow loading dev plugins with the wrong API level, but add a validation error
This commit is contained in:
parent
d628be9536
commit
7283e634e9
4 changed files with 26 additions and 2 deletions
|
|
@ -93,6 +93,9 @@ internal static class PluginValidator
|
|||
if (string.IsNullOrEmpty(plugin.Manifest.Author))
|
||||
problems.Add(new NoAuthorProblem());
|
||||
|
||||
if (plugin.IsOutdated)
|
||||
problems.Add(new WrongApiLevelProblem());
|
||||
|
||||
return problems;
|
||||
}
|
||||
|
||||
|
|
@ -192,4 +195,17 @@ internal static class PluginValidator
|
|||
/// <inheritdoc/>
|
||||
public string GetLocalizedDescription() => "Your plugin does not have an author in its manifest.";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Representing a problem where a plugin has an outdated API level.
|
||||
/// </summary>
|
||||
public class WrongApiLevelProblem : IValidationProblem
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public ValidationSeverity Severity => ValidationSeverity.Fatal;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string GetLocalizedDescription() => "Your plugin specifies an outdated API level. " +
|
||||
"Please update it by updating DalamudPackager or Dalamud.NET.Sdk.";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue