Remove manual comp registrations from client / server (#3626)

This commit is contained in:
metalgearsloth
2023-01-10 22:32:07 +11:00
committed by GitHub
parent 18a579947f
commit 59d40eb56c
22 changed files with 46 additions and 74 deletions

View File

@@ -19,6 +19,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Prototypes;
@@ -134,11 +135,26 @@ namespace Robust.UnitTesting
compFactory.RegisterClass<MapGridComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(ContainerManagerComponent)))
{
compFactory.RegisterClass<ContainerManagerComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(MetaDataComponent)))
{
compFactory.RegisterClass<MetaDataComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(TransformComponent)))
{
compFactory.RegisterClass<TransformComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(PhysicsComponent)))
{
compFactory.RegisterClass<PhysicsComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(PhysicsMapComponent)))
{
compFactory.RegisterClass<PhysicsMapComponent>();

View File

@@ -25,6 +25,8 @@ namespace Robust.UnitTesting.Shared.Prototypes
var factory = IoCManager.Resolve<IComponentFactory>();
factory.RegisterClass<TestBasicPrototypeComponent>();
factory.RegisterClass<PointLightComponent>();
// I'm so sorry
factory.RegisterClass<SpriteComponent>();
IoCManager.Resolve<ISerializationManager>().Initialize();
manager = IoCManager.Resolve<IPrototypeManager>();