This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace ShrinkModFramework
|
||||
@@ -19,7 +20,8 @@ namespace ShrinkModFramework
|
||||
new Dictionary<string, ShrinkModHandle>();
|
||||
|
||||
public static async UniTask<IReadOnlyDictionary<string, ShrinkModHandle>> ApplyDiscoveredAsync(
|
||||
ShrinkModFrameworkSettings settings = null)
|
||||
ShrinkModFrameworkSettings settings = null,
|
||||
IEnumerable<string> authorizedDllPaths = null)
|
||||
{
|
||||
settings ??= ShrinkModFrameworkSettings.Instance;
|
||||
var verboseLogging = settings == null || settings.verboseLogging;
|
||||
@@ -34,7 +36,9 @@ namespace ShrinkModFramework
|
||||
ShrinkModNetworkManager.Configure(settings == null || settings.enableNetworkSync, verboseLogging);
|
||||
try
|
||||
{
|
||||
var sources = ShrinkModComponentDiscovery.Discover(settings, verboseLogging);
|
||||
var authorizedPaths = authorizedDllPaths?.ToArray() ?? Array.Empty<string>();
|
||||
var sources = ShrinkModComponentDiscovery.Discover(
|
||||
settings, verboseLogging, authorizedPaths);
|
||||
await _host.ApplyAsync(sources);
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user