NewsWriterComponent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Content.Server.MassMedia.Systems;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Server.MassMedia.Components;
  5. [RegisterComponent, AutoGenerateComponentPause]
  6. [Access(typeof(NewsSystem))]
  7. public sealed partial class NewsWriterComponent : Component
  8. {
  9. [ViewVariables(VVAccess.ReadWrite), DataField]
  10. public bool PublishEnabled;
  11. [ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
  12. public TimeSpan NextPublish;
  13. [ViewVariables(VVAccess.ReadWrite), DataField]
  14. public float PublishCooldown = 20f;
  15. [DataField]
  16. public SoundSpecifier NoAccessSound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
  17. [DataField]
  18. public SoundSpecifier ConfirmSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
  19. /// <summary>
  20. /// This stores the working title of the current article
  21. /// </summary>
  22. [DataField, ViewVariables]
  23. public string DraftTitle = "";
  24. /// <summary>
  25. /// This stores the working content of the current article
  26. /// </summary>
  27. [DataField, ViewVariables]
  28. public string DraftContent = "";
  29. }