Files
RobustToolbox/Robust.Client/GameObjects/ClientComponentFactory.cs
T
AcruidandPieter-Jan Briers 5fe0bd6e55 EntityStates (#798)
* Added a new special MetaDataComponent to store entity data that isn't specific to a component.

* Adds ExposeData to MetaDataComponent.
Name of the entity now defaults to the prototype name.

* EntityStates changed so that the list of networked components is not sent every tick for a modified entity.

* Code cleanup & doc comments.

* MetaDataComponent Name and Description are taken from the prototype before storing them in the component.

* Adds the EntityState serializer benchmark. This isn't a test, but is really useful.

* Redesigned the logic in ServerGameStateManager.

* Adds MetaDataComponent registration to the UnitTesting project.
2019-04-26 15:38:56 +02:00

64 lines
2.3 KiB
C#

using Robust.Client.GameObjects.Components;
using Robust.Client.GameObjects.Components.Animations;
using Robust.Client.GameObjects.Components.UserInterface;
using Robust.Client.Interfaces.GameObjects;
using Robust.Client.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Physics;
namespace Robust.Client.GameObjects
{
public class ClientComponentFactory : ComponentFactory
{
public ClientComponentFactory()
{
// Required for the engine to work
Register<MetaDataComponent>();
RegisterReference<MetaDataComponent, IMetaDataComponent>();
// Required for the engine to work
Register<TransformComponent>();
RegisterReference<TransformComponent, ITransformComponent>();
Register<CollidableComponent>();
RegisterReference<CollidableComponent, ICollidable>();
RegisterReference<CollidableComponent, ICollidableComponent>();
Register<IconComponent>();
RegisterIgnore("KeyBindingInput");
Register<PointLightComponent>();
Register<PhysicsComponent>();
Register<InputComponent>();
Register<ClientBoundingBoxComponent>();
RegisterReference<ClientBoundingBoxComponent, BoundingBoxComponent>();
Register<SpriteComponent>();
RegisterReference<SpriteComponent, ISpriteComponent>();
RegisterReference<SpriteComponent, IClickTargetComponent>();
Register<ClickableComponent>();
RegisterReference<ClickableComponent, IClientClickableComponent>();
RegisterReference<ClickableComponent, IClickableComponent>();
Register<OccluderComponent>();
Register<EyeComponent>();
Register<AppearanceComponent>();
Register<AppearanceTestComponent>();
Register<SnapGridComponent>();
Register<ClientUserInterfaceComponent>();
RegisterReference<ClientUserInterfaceComponent, SharedUserInterfaceComponent>();
RegisterIgnore("IgnorePause");
Register<AnimationPlayerComponent>();
}
}
}