Files
tbd-station-14/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs
metalgearsloth 99a41a12ab Fix PostMapInit tests not considering job containerspawns (#31538)
* Fix PostMapInit tests nto considering job containerspawns

* fix
2024-08-28 12:42:06 +10:00

33 lines
1.1 KiB
C#

using Content.Server.Spawners.EntitySystems;
using Content.Shared.Roles;
using Robust.Shared.Prototypes;
namespace Content.Server.Spawners.Components;
/// <summary>
/// A spawn point that spawns a player into a target container rather than simply spawning them at a position.
/// Occurs before regular spawn points but after arrivals.
/// </summary>
[RegisterComponent]
[Access(typeof(ContainerSpawnPointSystem))]
public sealed partial class ContainerSpawnPointComponent : Component, ISpawnPoint
{
/// <summary>
/// The ID of the container that this entity will spawn players into
/// </summary>
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public string ContainerId = string.Empty;
/// <summary>
/// An optional job specifier
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<JobPrototype>? Job;
/// <summary>
/// The type of spawn point
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public SpawnPointType SpawnType { get; set; } = SpawnPointType.Unset;
}