using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects;
///
/// Adds a set of components to this entity.
///
///
public sealed partial class AddComponentsEntityEffectSystem : EntityEffectSystem
{
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
EntityManager.AddComponents(entity, args.Effect.Components, args.Effect.ReplaceExisting);
}
}
///
public sealed partial class AddComponents : EntityEffectBase
{
///
/// Components to add to this entity.
///
[DataField(required: true)]
public ComponentRegistry Components = new();
///
/// Replace existing components instead of keeping their current configuration.
///
[DataField]
public bool ReplaceExisting;
}