Merge branch 'multiple-callbacks' into 20-11-13-merges

This commit is contained in:
Pieter-Jan Briers
2020-11-13 01:30:07 +01:00
3 changed files with 18 additions and 9 deletions

View File

@@ -55,6 +55,20 @@ namespace Content.IntegrationTests
options ??= new ServerIntegrationOptions();
options.ServerContentAssembly = typeof(Server.EntryPoint).Assembly;
options.SharedContentAssembly = typeof(Shared.EntryPoint).Assembly;
options.BeforeStart += () =>
{
IoCManager.Resolve<IModLoader>().SetModuleBaseCallbacks(new ServerModuleTestingCallbacks
{
ServerBeforeIoC = () =>
{
if (options is ServerContentIntegrationOption contentOptions)
{
contentOptions.ContentBeforeIoC?.Invoke();
}
}
});
};
return base.StartServer(options);
}
@@ -67,11 +81,6 @@ namespace Content.IntegrationTests
{
ServerBeforeIoC = () =>
{
if (options is ServerContentIntegrationOption contentOptions)
{
contentOptions.ContentBeforeIoC?.Invoke();
}
IoCManager.Register<IGameTicker, DummyGameTicker>(true);
}
});