mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge branch 'net5'
This commit is contained in:
commit
c5c1906ca0
1 changed files with 29 additions and 3 deletions
|
|
@ -1031,18 +1031,33 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
// Testing exclusive
|
// Testing exclusive
|
||||||
if (manifest.IsTestingExclusive && !this.configuration.DoPluginTest)
|
if (manifest.IsTestingExclusive && !this.configuration.DoPluginTest)
|
||||||
|
{
|
||||||
|
Log.Verbose($"Testing exclusivity: {manifest.InternalName} - {manifest.AssemblyVersion} - {manifest.TestingAssemblyVersion}");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Applicable version
|
// Applicable version
|
||||||
if (manifest.ApplicableVersion < this.startInfo.GameVersion)
|
if (manifest.ApplicableVersion < this.startInfo.GameVersion)
|
||||||
|
{
|
||||||
|
Log.Verbose($"Game version: {manifest.InternalName} - {manifest.AssemblyVersion} - {manifest.TestingAssemblyVersion}");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// API level
|
// API level
|
||||||
if (manifest.DalamudApiLevel < DalamudApiLevel && !this.LoadAllApiLevels)
|
if (manifest.DalamudApiLevel < DalamudApiLevel && !this.LoadAllApiLevels)
|
||||||
|
{
|
||||||
|
Log.Verbose($"API Level: {manifest.InternalName} - {manifest.AssemblyVersion} - {manifest.TestingAssemblyVersion}");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Banned
|
// Banned
|
||||||
return !this.IsManifestBanned(manifest);
|
if (this.IsManifestBanned(manifest))
|
||||||
|
{
|
||||||
|
Log.Verbose($"Banned: {manifest.InternalName} - {manifest.AssemblyVersion} - {manifest.TestingAssemblyVersion}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -1054,8 +1069,19 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
Debug.Assert(this.bannedPlugins != null, "this.bannedPlugins != null");
|
Debug.Assert(this.bannedPlugins != null, "this.bannedPlugins != null");
|
||||||
|
|
||||||
return !this.LoadBannedPlugins && this.bannedPlugins.Any(ban => (ban.Name == manifest.InternalName || ban.Name == Hash.GetStringSha256Hash(manifest.InternalName))
|
if (this.LoadBannedPlugins)
|
||||||
&& ban.AssemblyVersion >= manifest.AssemblyVersion);
|
return true;
|
||||||
|
|
||||||
|
var config = Service<DalamudConfiguration>.Get();
|
||||||
|
|
||||||
|
var versionToCheck = manifest.AssemblyVersion;
|
||||||
|
if (config.DoPluginTest && manifest.TestingAssemblyVersion > manifest.AssemblyVersion)
|
||||||
|
{
|
||||||
|
versionToCheck = manifest.TestingAssemblyVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.bannedPlugins.Any(ban => (ban.Name == manifest.InternalName || ban.Name == Hash.GetStringSha256Hash(manifest.InternalName))
|
||||||
|
&& ban.AssemblyVersion >= versionToCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue