mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 08:37:26 +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>
24 lines
762 B
C#
24 lines
762 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared._DV.Traits.Effects;
|
|
|
|
/// <summary>
|
|
/// Effect that spawns an item and attempts to place it in the player's hand.
|
|
/// If the player cannot hold the item, it is spawned at their feet.
|
|
/// </summary>
|
|
public sealed partial class SpawnItemInHandEffect : BaseTraitEffect
|
|
{
|
|
/// <summary>
|
|
/// The entity prototype to spawn.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntProtoId Item = string.Empty;
|
|
|
|
public override void Apply(TraitEffectContext ctx)
|
|
{
|
|
// This effect needs to be applied server-side where we have access to
|
|
// SharedHandsSystem. The actual spawning logic is handled by the server TraitSystem.
|
|
// This class just holds the data.
|
|
}
|
|
}
|