mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
Expose the InstalledFromUrl as SourceRepository in the DalamudPluginInterface.
This commit is contained in:
parent
1c5383a335
commit
722564c19d
2 changed files with 9 additions and 2 deletions
|
|
@ -40,7 +40,8 @@ namespace Dalamud.Plugin
|
||||||
/// <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();
|
||||||
|
|
@ -53,6 +54,7 @@ namespace Dalamud.Plugin
|
||||||
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 ? "DevPlugin" : sourceRepository;
|
||||||
|
|
||||||
this.LoadTime = DateTime.Now;
|
this.LoadTime = DateTime.Now;
|
||||||
this.LoadTimeUTC = DateTime.UtcNow;
|
this.LoadTimeUTC = DateTime.UtcNow;
|
||||||
|
|
@ -122,6 +124,11 @@ namespace Dalamud.Plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public FileInfo AssemblyLocation { get; }
|
public FileInfo AssemblyLocation { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the custom repository from which this plugin is installed, the main repo flag or "DevPlugin".
|
||||||
|
/// </summary>
|
||||||
|
public string SourceRepository { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the directory your plugin configurations are stored in.
|
/// Gets the directory your plugin configurations are stored in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue