mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
More expressive code
This commit is contained in:
parent
8edbc0ee78
commit
87adb2dfb7
2 changed files with 4 additions and 3 deletions
|
|
@ -2454,10 +2454,11 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
var configuration = Service<DalamudConfiguration>.Get();
|
var configuration = Service<DalamudConfiguration>.Get();
|
||||||
var pluginManager = Service<PluginManager>.Get();
|
var pluginManager = Service<PluginManager>.Get();
|
||||||
|
|
||||||
|
var canUseTesting = pluginManager.CanUseTesting(manifest);
|
||||||
var useTesting = pluginManager.UseTesting(manifest);
|
var useTesting = pluginManager.UseTesting(manifest);
|
||||||
var wasSeen = this.WasPluginSeen(manifest.InternalName);
|
var wasSeen = this.WasPluginSeen(manifest.InternalName);
|
||||||
|
|
||||||
var effectiveApiLevel = useTesting && manifest.TestingDalamudApiLevel != null ? manifest.TestingDalamudApiLevel.Value : manifest.DalamudApiLevel;
|
var effectiveApiLevel = useTesting ? manifest.TestingDalamudApiLevel.Value : manifest.DalamudApiLevel;
|
||||||
var isOutdated = effectiveApiLevel < PluginManager.DalamudApiLevel;
|
var isOutdated = effectiveApiLevel < PluginManager.DalamudApiLevel;
|
||||||
|
|
||||||
var isIncompatible = manifest.MinimumDalamudVersion != null &&
|
var isIncompatible = manifest.MinimumDalamudVersion != null &&
|
||||||
|
|
@ -2487,7 +2488,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
label += Locs.PluginTitleMod_TestingExclusive;
|
label += Locs.PluginTitleMod_TestingExclusive;
|
||||||
}
|
}
|
||||||
else if (configuration.DoPluginTest && PluginManager.HasTestingVersion(manifest))
|
else if (canUseTesting)
|
||||||
{
|
{
|
||||||
label += Locs.PluginTitleMod_TestingAvailable;
|
label += Locs.PluginTitleMod_TestingAvailable;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ internal class LocalPlugin : IAsyncDisposable
|
||||||
throw new PluginPreconditionFailedException($"Unable to load {this.Name}, game is newer than applicable version {this.manifest.ApplicableVersion}");
|
throw new PluginPreconditionFailedException($"Unable to load {this.Name}, game is newer than applicable version {this.manifest.ApplicableVersion}");
|
||||||
|
|
||||||
// We want to allow loading dev plugins with a lower API level than the current Dalamud API level, for ease of development
|
// We want to allow loading dev plugins with a lower API level than the current Dalamud API level, for ease of development
|
||||||
if (this.manifest.EffectiveApiLevel < PluginManager.DalamudApiLevel && !pluginManager.LoadAllApiLevels && !this.IsDev)
|
if (!pluginManager.LoadAllApiLevels && !this.IsDev && this.manifest.EffectiveApiLevel < PluginManager.DalamudApiLevel)
|
||||||
throw new PluginPreconditionFailedException($"Unable to load {this.Name}, incompatible API level {this.manifest.EffectiveApiLevel}");
|
throw new PluginPreconditionFailedException($"Unable to load {this.Name}, incompatible API level {this.manifest.EffectiveApiLevel}");
|
||||||
|
|
||||||
// We might want to throw here?
|
// We might want to throw here?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue