mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge branch 'master' of github.com:goatcorp/Dalamud
This commit is contained in:
commit
4e1772023b
3 changed files with 14 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ using Dalamud.Game.Text.SeStringHandling.Payloads;
|
|||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Dalamud.Plugin.Ipc.Exceptions;
|
||||
using Dalamud.Plugin.Ipc.Internal;
|
||||
|
|
@ -41,7 +42,8 @@ public sealed class DalamudPluginInterface : IDisposable
|
|||
/// <param name="assemblyLocation">Location of the assembly.</param>
|
||||
/// <param name="reason">The reason the plugin was loaded.</param>
|
||||
/// <param name="isDev">A value indicating whether this is a dev plugin.</param>
|
||||
internal DalamudPluginInterface(string pluginName, FileInfo assemblyLocation, PluginLoadReason reason, bool isDev)
|
||||
/// <param name="sourceRepository">The repository from which the plugin is installed.</param>
|
||||
internal DalamudPluginInterface(string pluginName, FileInfo assemblyLocation, PluginLoadReason reason, bool isDev, string sourceRepository)
|
||||
{
|
||||
var configuration = Service<DalamudConfiguration>.Get();
|
||||
var dataManager = Service<DataManager>.Get();
|
||||
|
|
@ -54,6 +56,7 @@ public sealed class DalamudPluginInterface : IDisposable
|
|||
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
||||
this.Reason = reason;
|
||||
this.IsDev = isDev;
|
||||
this.SourceRepository = isDev ? LocalPluginManifest.FlagDevPlugin : sourceRepository;
|
||||
|
||||
this.LoadTime = DateTime.Now;
|
||||
this.LoadTimeUTC = DateTime.UtcNow;
|
||||
|
|
@ -92,6 +95,11 @@ public sealed class DalamudPluginInterface : IDisposable
|
|||
/// Gets the reason this plugin was loaded.
|
||||
/// </summary>
|
||||
public PluginLoadReason Reason { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the custom repository from which this plugin is installed, <inheritdoc cref="LocalPluginManifest.FlagMainRepo"/>, or <inheritdoc cref="LocalPluginManifest.FlagDevPlugin"/>.
|
||||
/// </summary>
|
||||
public string SourceRepository { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this is a dev plugin.
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ internal class LocalPlugin : IDisposable
|
|||
new PluginPatchData(this.DllFile);
|
||||
|
||||
this.DalamudInterface =
|
||||
new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, this.DllFile, reason, this.IsDev);
|
||||
new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, this.DllFile, reason, this.IsDev, this.Manifest.InstalledFromUrl );
|
||||
|
||||
if (this.Manifest.LoadSync && this.Manifest.LoadRequiredState is 0 or 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ internal record LocalPluginManifest : PluginManifest
|
|||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public const string FlagMainRepo = "OFFICIAL";
|
||||
|
||||
/// <summary> "DEVPLUGIN" </summary>
|
||||
[JsonIgnore]
|
||||
public const string FlagDevPlugin = "DEVPLUGIN";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the plugin is disabled and should not be loaded.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue