mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #618 from daemitus/assemblyLocation
This commit is contained in:
commit
7152a2242d
2 changed files with 9 additions and 2 deletions
|
|
@ -35,9 +35,10 @@ namespace Dalamud.Plugin
|
|||
/// Set up the interface and populate all fields needed.
|
||||
/// </summary>
|
||||
/// <param name="pluginName">The internal name of the plugin.</param>
|
||||
/// <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, PluginLoadReason reason, bool isDev)
|
||||
internal DalamudPluginInterface(string pluginName, FileInfo assemblyLocation, PluginLoadReason reason, bool isDev)
|
||||
{
|
||||
var configuration = Service<DalamudConfiguration>.Get();
|
||||
var dataManager = Service<DataManager>.Get();
|
||||
|
|
@ -46,6 +47,7 @@ namespace Dalamud.Plugin
|
|||
this.UiBuilder = new UiBuilder(pluginName);
|
||||
|
||||
this.pluginName = pluginName;
|
||||
this.AssemblyLocation = assemblyLocation;
|
||||
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
||||
this.Reason = reason;
|
||||
this.IsDev = isDev;
|
||||
|
|
@ -113,6 +115,11 @@ namespace Dalamud.Plugin
|
|||
/// </summary>
|
||||
public DirectoryInfo DalamudAssetDirectory => Service<Dalamud>.Get().AssetDirectory;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location of your plugin assembly.
|
||||
/// </summary>
|
||||
public FileInfo AssemblyLocation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the directory your plugin configurations are stored in.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ namespace Dalamud.Plugin.Internal
|
|||
// Update the location for the Location and CodeBase patches
|
||||
PluginManager.PluginLocations[this.pluginType.Assembly.FullName] = new(this.DllFile);
|
||||
|
||||
this.DalamudInterface = new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, reason, this.IsDev);
|
||||
this.DalamudInterface = new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, this.DllFile, reason, this.IsDev);
|
||||
|
||||
var ioc = Service<ServiceContainer>.Get();
|
||||
this.instance = ioc.Create(this.pluginType, this.DalamudInterface) as IDalamudPlugin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue