Workshop - Redesigned library

Workshop - Limit screen width to keep main content at 1000px
Workshop - Auto-updating WIP
This commit is contained in:
Robert committed 2024-07-13 20:25:40 +02:00
1 parent 4552b3ba17
commit 99d11e1921
37 files changed
+955 -200

No files matched your search

+15 -1
View File
@@ -116,6 +116,11 @@ public class PluginInfo : IPrerequisitesSubject
[JsonInclude]
public Version? Api { get; internal init; } = new(1, 0, 0);
/// <summary>
/// Gets the minimum version of Artemis required by this plugin
/// </summary>
public Version? MinimumVersion { get; internal init; } = new(1, 0, 0);
/// <summary>
/// Gets the plugin this info is associated with
/// </summary>
@@ -132,7 +137,7 @@ public class PluginInfo : IPrerequisitesSubject
/// Gets a boolean indicating whether this plugin is compatible with the current operating system and API version
/// </summary>
[JsonIgnore]
public bool IsCompatible => Platforms.MatchesCurrentOperatingSystem() && Api != null && Api.Major >= Constants.PluginApiVersion;
public bool IsCompatible => Platforms.MatchesCurrentOperatingSystem() && Api != null && Api.Major >= Constants.PluginApiVersion && MatchesMinimumVersion();
/// <inheritdoc />
[JsonIgnore]
@@ -156,4 +161,13 @@ public class PluginInfo : IPrerequisitesSubject
{
return $"{Name} v{Version} - {Guid}";
}
private bool MatchesMinimumVersion()
{
if (Constants.CurrentVersion == "local")
return true;
Version currentVersion = new(Constants.CurrentVersion);
return currentVersion >= MinimumVersion;
}
}