Turns GameTicker into an EntitySystem. (#4197)
* GameTicker turned into an EntitySystem * Turns ClientGameTicker into an EntitySystem, turn NetMessages into events * Change event names to be more consistent with the rest. * YAML linter uses the dummy gameticker CVar override. * Fix game ticker initialization order * Dummy ticker won't spawn players. * Fix character creation test
This commit is contained in:
committed by
GitHub
parent
15fb554c28
commit
d3a611164b
@@ -5,10 +5,12 @@ using Content.Client.Parallax.Managers;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.IoC;
|
||||
using Content.Shared.CCVar;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Robust.Server.Maps;
|
||||
using Robust.Shared;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
@@ -57,7 +59,7 @@ namespace Content.IntegrationTests
|
||||
|
||||
// Connecting to Discord is a massive waste of time.
|
||||
// Basically just makes the CI logs a mess.
|
||||
options.CVarOverrides["discord.enabled"] = "false";
|
||||
options.CVarOverrides[CVars.DiscordEnabled.Name] = "false";
|
||||
|
||||
// Avoid preloading textures in tests.
|
||||
options.CVarOverrides.TryAdd(CVars.TexturePreloadingEnabled.Name, "false");
|
||||
@@ -112,16 +114,9 @@ namespace Content.IntegrationTests
|
||||
protected ServerIntegrationInstance StartServerDummyTicker(ServerIntegrationOptions options = null)
|
||||
{
|
||||
options ??= new ServerIntegrationOptions();
|
||||
options.BeforeStart += () =>
|
||||
{
|
||||
IoCManager.Resolve<IModLoader>().SetModuleBaseCallbacks(new ServerModuleTestingCallbacks
|
||||
{
|
||||
ServerBeforeIoC = () =>
|
||||
{
|
||||
IoCManager.Register<IGameTicker, DummyGameTicker>(true);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Dummy game ticker.
|
||||
options.CVarOverrides[CCVars.GameDummyTicker.Name] = "true";
|
||||
|
||||
return StartServer(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user