1
0

ContainerSpawnPointComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Server.Spawners.EntitySystems;
  2. using Content.Shared.Roles;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Spawners.Components;
  5. /// <summary>
  6. /// A spawn point that spawns a player into a target container rather than simply spawning them at a position.
  7. /// Occurs before regular spawn points but after arrivals.
  8. /// </summary>
  9. [RegisterComponent]
  10. [Access(typeof(ContainerSpawnPointSystem))]
  11. public sealed partial class ContainerSpawnPointComponent : Component, ISpawnPoint
  12. {
  13. /// <summary>
  14. /// The ID of the container that this entity will spawn players into
  15. /// </summary>
  16. [DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
  17. public string ContainerId = string.Empty;
  18. /// <summary>
  19. /// An optional job specifier
  20. /// </summary>
  21. [DataField, ViewVariables(VVAccess.ReadWrite)]
  22. public ProtoId<JobPrototype>? Job;
  23. /// <summary>
  24. /// The type of spawn point
  25. /// </summary>
  26. [DataField, ViewVariables(VVAccess.ReadWrite)]
  27. public SpawnPointType SpawnType { get; set; } = SpawnPointType.Unset;
  28. }