Files
RobustToolbox/Robust.Client/GameObjects/ClientComponentFactory.cs
T
AcruidandPieter-Jan Briers f2eb035ed8 Physics Shapes (#847)
* Adds a new IPhysicsShape object where you can define what collisions shape a PhysBody has.
AABB is now accessed through the PhysicsShape, so the BoundingBoxComponent is not required.

* Default PhysShape now copies the AABB of the BoundingBoxComponent.

* Fixed issue with serialization of PhysShapeAabbComp.

* Spatial queries now use ICollidableComponent instead of BoundingBoxComponent.
showbb now draws entities using the obsolete BoundingBoxComponent in Aqua.

* Renamed PhysShapeAabbComp to PhysShapeAabb.
Removed BoundingBoxComponent.

* Default CollidableComponent does not collide with anything now.

* Renamed ICollidable to IPhysBody.
Moved ICollidable to the Robust.Shared/Physics namespace.

* PhysShapes are now a collection of primitive shapes that contribute to the whole PhysBody.
ObjectSerializer.DataField can now deal with abstract types using YAML tags.

* Added LocalBounds property to ClickableComponent.
Added state to ClickableComponent.

* Added a Rectangle physics shape.

* ClickableComponent now actually checks that a click is inside its bounds.

* Reverted the addition of a try/catch around map loading. Any errors can propagate to the code trying to load the map again.
2019-09-03 22:06:50 +02:00

61 lines
2.2 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.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, IPhysBody>();
RegisterReference<CollidableComponent, ICollidableComponent>();
Register<IconComponent>();
RegisterIgnore("KeyBindingInput");
Register<PointLightComponent>();
Register<PhysicsComponent>();
Register<InputComponent>();
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>();
}
}
}