More Transform ECS (#3368)

This commit is contained in:
Leon Friedrich
2022-10-30 05:36:23 +13:00
committed by GitHub
parent 26c85725a5
commit 1e843bf3a2
15 changed files with 351 additions and 326 deletions

View File

@@ -85,17 +85,30 @@ namespace Robust.UnitTesting
// uhhh so maybe these are the wrong system for the client, but I CBF adding sprite system and all the rest,
// and it was like this when I found it.
systems.LoadExtraSystemType<Robust.Server.Containers.ContainerSystem>();
systems.LoadExtraSystemType<Robust.Server.GameObjects.TransformSystem>();
systems.LoadExtraSystemType<SharedGridTraversalSystem>();
systems.LoadExtraSystemType<FixtureSystem>();
if (Project == UnitTestProject.Client)
{
systems.LoadExtraSystemType<ClientMetaDataSystem>();
systems.LoadExtraSystemType<Robust.Server.Containers.ContainerSystem>();
systems.LoadExtraSystemType<Robust.Server.GameObjects.TransformSystem>();
systems.LoadExtraSystemType<Robust.Client.Physics.BroadPhaseSystem>();
systems.LoadExtraSystemType<Robust.Client.Physics.JointSystem>();
systems.LoadExtraSystemType<Robust.Client.Physics.PhysicsSystem>();
systems.LoadExtraSystemType<Robust.Client.Debugging.DebugRayDrawingSystem>();
}
else
{
systems.LoadExtraSystemType<ServerMetaDataSystem>();
systems.LoadExtraSystemType<PVSSystem>();
systems.LoadExtraSystemType<Robust.Server.Containers.ContainerSystem>();
systems.LoadExtraSystemType<Robust.Server.GameObjects.TransformSystem>();
systems.LoadExtraSystemType<BroadPhaseSystem>();
systems.LoadExtraSystemType<JointSystem>();
systems.LoadExtraSystemType<PhysicsSystem>();
systems.LoadExtraSystemType<DebugRayDrawingSystem>();
}
var entMan = IoCManager.Resolve<IEntityManager>();
@@ -124,6 +137,11 @@ namespace Robust.UnitTesting
compFactory.RegisterClass<FixturesComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(JointComponent)))
{
compFactory.RegisterClass<JointComponent>();
}
// So by default EntityManager does its own EntitySystemManager initialize during Startup.
// We want to bypass this and load our own systems hence we will manually initialize it here.
entMan.Initialize();