Files
Delta-v/Content.Shared/_DV/Traits/Effects/AddCompsEffect.cs
T
4364eaa388 real traits system (#5208)
* holy shit?

* final touches

* this is dumb

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* whatever go my integration tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* whoopsie forgot blacklists

* load bearing loc

* minor stuff

* whoopsie

* cool

* I LOVE REFLECTION

* got a call from the stink department

* i love fluent yes

* direction changes

* waiter more migrations please

* typo ops

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tobias Berger <toby@tobot.dev>
2026-01-20 12:49:59 +01:00

22 lines
599 B
C#

using Robust.Shared.Prototypes;
namespace Content.Shared._DV.Traits.Effects;
/// <summary>
/// Effect that adds components to the player entity.
/// Components are added without overwriting existing ones.
/// </summary>
public sealed partial class AddCompsEffect : BaseTraitEffect
{
/// <summary>
/// The components to add to the entity.
/// </summary>
[DataField(required: true)]
public ComponentRegistry Components = new();
public override void Apply(TraitEffectContext ctx)
{
ctx.EntMan.AddComponents(ctx.Player, Components, removeExisting: false);
}
}