diff --git a/README.md b/README.md index 6807edb84..17f118086 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ public partial class PluginClassName : BasePlugin { public override void Load(bool hotReload) { - Console.WriteLine("Hello World!!"); + Console.WriteLine("Hello World!"); // Check examples folder for more information. Don't forget to delete the folder after reading. } diff --git a/gitversion.yml b/gitversion.yml index ec365189f..82f0327f3 100644 --- a/gitversion.yml +++ b/gitversion.yml @@ -14,6 +14,7 @@ branches: label: beta is-release-branch: false is-main-branch: false + source-branches: [ master ] ignore: sha: [] merge-message-formats: {} @@ -21,5 +22,5 @@ commit-message-incrementing: Enabled major-version-bump-message: '\+semver:\s?(breaking|major)' minor-version-bump-message: '\+semver:\s?(feature|minor)' patch-version-bump-message: '\+semver:\s?(fix|patch)' -tag-prefix: 'v' +tag-prefix: v commit-date-format: yyyy-MM-dd \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs b/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs index 6ddfbf20d..fa4649168 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs @@ -59,9 +59,11 @@ internal class SwiftlyCore : ISwiftlyCore, IDisposable { public Localizer Localizer { get; init; } public PermissionManager PermissionManager { get; init; } public RegistratorService RegistratorService { get; init; } + public string ContextBasePath { get; init; } public SwiftlyCore(string contextId, string contextBaseDirectory, PluginManifest? pluginManifest, Type contextType, IServiceProvider coreProvider) { CoreContext id = new(contextId, contextBaseDirectory, pluginManifest); + ContextBasePath = contextBaseDirectory; ServiceCollection services = new(); @@ -178,4 +180,5 @@ public void Dispose() { ILocalizer ISwiftlyCore.Localizer => Localizer; IPermissionManager ISwiftlyCore.Permission => PermissionManager; IRegistratorService ISwiftlyCore.Registrator => RegistratorService; + string ISwiftlyCore.PluginPath => ContextBasePath; } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs b/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs index 515f2b7d3..a0acdf4c3 100644 --- a/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs +++ b/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs @@ -126,4 +126,9 @@ public interface ISwiftlyCore { /// Registrator service. /// public IRegistratorService Registrator { get; } + + /// + /// Gets the file path to the plugin directory. + /// + public string PluginPath { get; } } \ No newline at end of file