Merge branch 'multiple-callbacks' into 20-11-13-merges
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user