SpawnPointComponent.cs 651 B

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.Roles;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.Spawners.Components;
  4. [RegisterComponent]
  5. public sealed partial class SpawnPointComponent : Component, ISpawnPoint
  6. {
  7. [DataField("job_id")]
  8. public ProtoId<JobPrototype>? Job;
  9. /// <summary>
  10. /// The type of spawn point
  11. /// </summary>
  12. [DataField("spawn_type"), ViewVariables(VVAccess.ReadWrite)]
  13. public SpawnPointType SpawnType { get; set; } = SpawnPointType.Unset;
  14. public override string ToString()
  15. {
  16. return $"{Job} {SpawnType}";
  17. }
  18. }
  19. public enum SpawnPointType
  20. {
  21. Unset = 0,
  22. LateJoin,
  23. Job,
  24. Observer,
  25. }