Files
RobustToolbox/Robust.Shared/Physics/Components/FixturesChangeComponent.cs
metalgearslothandGitHub 43fd6bc764 Add FixturesChangeComponent (#5383)
* Add FixturesChangeComponent

Adds / removes fixtures. Useful when used in conjunction with EntProtoId to dynamically add / remove fixtures.

* Move to system

* Fix allcomps test
2024-08-25 20:25:19 +10:00

18 lines
597 B
C#

using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Robust.Shared.Physics.Components;
/// <summary>
/// Adds / removes fixtures on startup / shutdown without modifying the other fixtures on the entity.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FixturesChangeComponent : Component
{
[DataField, AutoNetworkedField]
public Dictionary<string, Fixture> Fixtures = new();
}