mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* documentation pass on content.server -> E! * APi pass on content.server for the E folder. * documentation pass on content.shared for e. * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * fixing documentation according to review part 1. * typo * Very minor fixes * And a short explanation about EUI --------- Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Engineering.Components
|
|
{
|
|
/// <summary>
|
|
/// This component enables the spawn of a specific entity upon being interacted with.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class SpawnAfterInteractComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The prototype id of the entity to be spawned in.
|
|
/// </summary>
|
|
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string? Prototype { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Stops the spawn if the target space is no longer in reach, unless true.
|
|
/// </summary>
|
|
[DataField("ignoreDistance")]
|
|
public bool IgnoreDistance { get; private set; }
|
|
|
|
/// <summary>
|
|
/// The length of the interact action.
|
|
/// </summary>
|
|
[DataField("doAfter")]
|
|
public float DoAfterTime = 0;
|
|
|
|
/// <summary>
|
|
/// If the entity with this component should be deleted upon a successful spawn.
|
|
/// </summary>
|
|
[DataField("removeOnInteract")]
|
|
public bool RemoveOnInteract = false;
|
|
}
|
|
}
|