AnnounceOnSpawnComponent.cs 923 B

123456789101112131415161718192021222324252627282930313233343536
  1. using Content.Server.Chat.Systems;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Maths;
  4. namespace Content.Server.Chat;
  5. /// <summary>
  6. /// Dispatches an announcement to everyone when the entity is mapinit'd.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(AnnounceOnSpawnSystem))]
  9. public sealed partial class AnnounceOnSpawnComponent : Component
  10. {
  11. /// <summary>
  12. /// Locale id of the announcement message.
  13. /// </summary>
  14. [DataField(required: true)]
  15. public LocId Message = string.Empty;
  16. /// <summary>
  17. /// Locale id of the announcement's sender, defaults to Central Command.
  18. /// </summary>
  19. [DataField]
  20. public LocId? Sender;
  21. /// <summary>
  22. /// Sound override for the announcement.
  23. /// </summary>
  24. [DataField]
  25. public SoundSpecifier? Sound;
  26. /// <summary>
  27. /// Color override for the announcement.
  28. /// </summary>
  29. [DataField]
  30. public Color? Color;
  31. }