mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-02 09:07:27 +00:00
* 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>
22 lines
599 B
C#
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);
|
|
}
|
|
}
|