Fix LocalizedEntityCommands breaking content unit tests. (#5375)

They are now not loaded inside content unit tests.

Fixes #5374
This commit is contained in:
Pieter-Jan Briers
2024-08-21 02:43:46 +02:00
committed by GitHub
parent 0553600c9a
commit d46885b96d
3 changed files with 17 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ using Robust.Server.GameStates;
using Robust.Server.Physics;
using Robust.Shared.ComponentTrees;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.Containers;
using Robust.Shared.ContentPack;
using Robust.Shared.GameObjects;
@@ -165,6 +166,10 @@ namespace Robust.UnitTesting
var entMan = deps.Resolve<IEntityManager>();
var mapMan = deps.Resolve<IMapManager>();
// Avoid discovering EntityCommands since they may depend on systems
// that aren't available in a unit test context.
deps.Resolve<EntityConsoleHost>().DiscoverCommands = false;
// Required components for the engine to work
// Why are we still here? Just to suffer? Why can't we just use [RegisterComponent] magic?
// TODO End Suffering.