Skip to content

Commit a11babf

Browse files
committed
feat(core): Plugin Path
1 parent ad67b79 commit a11babf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ internal class SwiftlyCore : ISwiftlyCore, IDisposable {
5959
public Localizer Localizer { get; init; }
6060
public PermissionManager PermissionManager { get; init; }
6161
public RegistratorService RegistratorService { get; init; }
62+
public string ContextBasePath { get; init; }
6263
public SwiftlyCore(string contextId, string contextBaseDirectory, PluginManifest? pluginManifest, Type contextType, IServiceProvider coreProvider) {
6364

6465
CoreContext id = new(contextId, contextBaseDirectory, pluginManifest);
66+
ContextBasePath = contextBaseDirectory;
6567

6668
ServiceCollection services = new();
6769

@@ -178,4 +180,5 @@ public void Dispose() {
178180
ILocalizer ISwiftlyCore.Localizer => Localizer;
179181
IPermissionManager ISwiftlyCore.Permission => PermissionManager;
180182
IRegistratorService ISwiftlyCore.Registrator => RegistratorService;
183+
string ISwiftlyCore.PluginPath => ContextBasePath;
181184
}

managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,9 @@ public interface ISwiftlyCore {
126126
/// Registrator service.
127127
/// </summary>
128128
public IRegistratorService Registrator { get; }
129+
130+
/// <summary>
131+
/// Gets the file path to the plugin directory.
132+
/// </summary>
133+
public string PluginPath { get; }
129134
}

0 commit comments

Comments
 (0)