Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down
3 changes: 2 additions & 1 deletion gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ branches:
label: beta
is-release-branch: false
is-main-branch: false
source-branches: [ master ]
ignore:
sha: []
merge-message-formats: {}
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
3 changes: 3 additions & 0 deletions managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -178,4 +180,5 @@ public void Dispose() {
ILocalizer ISwiftlyCore.Localizer => Localizer;
IPermissionManager ISwiftlyCore.Permission => PermissionManager;
IRegistratorService ISwiftlyCore.Registrator => RegistratorService;
string ISwiftlyCore.PluginPath => ContextBasePath;
}
5 changes: 5 additions & 0 deletions managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ public interface ISwiftlyCore {
/// Registrator service.
/// </summary>
public IRegistratorService Registrator { get; }

/// <summary>
/// Gets the file path to the plugin directory.
/// </summary>
public string PluginPath { get; }
}
Loading