mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-21 16:09:19 +01:00
Merge pull request #1027 from Ottermandias/ParentRepo
This commit is contained in:
commit
e5b53c9ce2
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;
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
using Dalamud.Plugin.Internal;
|
using Dalamud.Plugin.Internal;
|
||||||
|
using Dalamud.Plugin.Internal.Types;
|
||||||
using Dalamud.Plugin.Ipc;
|
using Dalamud.Plugin.Ipc;
|
||||||
using Dalamud.Plugin.Ipc.Exceptions;
|
using Dalamud.Plugin.Ipc.Exceptions;
|
||||||
using Dalamud.Plugin.Ipc.Internal;
|
using Dalamud.Plugin.Ipc.Internal;
|
||||||
|
|
@ -41,7 +42,8 @@ public sealed class DalamudPluginInterface : IDisposable
|
||||||
/// <param name="assemblyLocation">Location of the assembly.</param>
|
/// <param name="assemblyLocation">Location of the assembly.</param>
|
||||||
/// <param name="reason">The reason the plugin was loaded.</param>
|
/// <param name="reason">The reason the plugin was loaded.</param>
|
||||||
/// <param name="isDev">A value indicating whether this is a dev plugin.</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 configuration = Service<DalamudConfiguration>.Get();
|
||||||
var dataManager = Service<DataManager>.Get();
|
var dataManager = Service<DataManager>.Get();
|
||||||
|
|
@ -54,6 +56,7 @@ public sealed class DalamudPluginInterface : IDisposable
|
||||||
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
||||||
this.Reason = reason;
|
this.Reason = reason;
|
||||||
this.IsDev = isDev;
|
this.IsDev = isDev;
|
||||||
|
this.SourceRepository = isDev ? LocalPluginManifest.FlagDevPlugin : sourceRepository;
|
||||||
|
|
||||||
this.LoadTime = DateTime.Now;
|
this.LoadTime = DateTime.Now;
|
||||||
this.LoadTimeUTC = DateTime.UtcNow;
|
this.LoadTimeUTC = DateTime.UtcNow;
|
||||||
|
|
@ -92,6 +95,11 @@ public sealed class DalamudPluginInterface : IDisposable
|
||||||
/// Gets the reason this plugin was loaded.
|
/// Gets the reason this plugin was loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PluginLoadReason Reason { get; }
|
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>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this is a dev plugin.
|
/// Gets a value indicating whether this is a dev plugin.
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@ internal class LocalPlugin : IDisposable
|
||||||
new PluginPatchData(this.DllFile);
|
new PluginPatchData(this.DllFile);
|
||||||
|
|
||||||
this.DalamudInterface =
|
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)
|
if (this.Manifest.LoadSync && this.Manifest.LoadRequiredState is 0 or 1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@ internal record LocalPluginManifest : PluginManifest
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public const string FlagMainRepo = "OFFICIAL";
|
public const string FlagMainRepo = "OFFICIAL";
|
||||||
|
|
||||||
|
/// <summary> "DEVPLUGIN" </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
public const string FlagDevPlugin = "DEVPLUGIN";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether the plugin is disabled and should not be loaded.
|
/// 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