using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Engineering.Components
{
///
/// This component enables the spawn of a specific entity upon being interacted with.
///
[RegisterComponent]
public sealed partial class SpawnAfterInteractComponent : Component
{
///
/// The prototype id of the entity to be spawned in.
///
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? Prototype { get; private set; }
///
/// Stops the spawn if the target space is no longer in reach, unless true.
///
[DataField("ignoreDistance")]
public bool IgnoreDistance { get; private set; }
///
/// The length of the interact action.
///
[DataField("doAfter")]
public float DoAfterTime = 0;
///
/// If the entity with this component should be deleted upon a successful spawn.
///
[DataField("removeOnInteract")]
public bool RemoveOnInteract = false;
}
}