Refactor the handling of date time to no longer depend on a static
Build / Build (push) Successful in 10m13s
Build / Build (push) Successful in 10m13s
This commit is contained in:
11 files changed
+53
-39
No files matched your search
@@ -19,14 +19,14 @@ public static class LibraryLoader
|
||||
/// <summary>
|
||||
/// Loads plugins and creates a static library from them.
|
||||
/// </summary>
|
||||
public static LoadResult LoadPlugins(IEnumerable<IPlugin> plugins)
|
||||
public static LoadResult LoadPlugins(IEnumerable<IPlugin> plugins, PluginEnvironmentHelpers helpers)
|
||||
{
|
||||
var registry = new ScriptRegistry();
|
||||
var orderedPlugins = plugins.OrderBy(x => x.LoadOrder).ToList();
|
||||
var staticLibrary = CreateStaticLibrary(orderedPlugins);
|
||||
foreach (var plugin in orderedPlugins)
|
||||
{
|
||||
plugin.Register(registry);
|
||||
plugin.Register(registry, helpers);
|
||||
}
|
||||
if (registry.DamageCalculator is null)
|
||||
throw new InvalidOperationException("Damage calculator not found in plugins.");
|
||||
|
||||
Reference in new issue
Block a user