Files
wwdpublic/Content.Server/MassMedia/Components/NewsWriterComponent.cs
themias fed8b840c3 Save unpublished news articles (#31491)
* Add draft saving to news consoles

* fix after bui changes

* comments + rename vars

* no

(cherry picked from commit ec4d59f6088ecc14b9231d51df18a4a4334d28ff)
2025-07-20 14:20:10 +10:00

38 lines
1.2 KiB
C#

using Content.Server.MassMedia.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.MassMedia.Components;
[RegisterComponent, AutoGenerateComponentPause]
[Access(typeof(NewsSystem))]
public sealed partial class NewsWriterComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField]
public bool PublishEnabled;
[ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextPublish;
[ViewVariables(VVAccess.ReadWrite), DataField]
public float PublishCooldown = 20f;
[DataField]
public SoundSpecifier NoAccessSound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
[DataField]
public SoundSpecifier ConfirmSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
/// <summary>
/// This stores the working title of the current article
/// </summary>
[DataField, ViewVariables]
public string DraftTitle = "";
/// <summary>
/// This stores the working content of the current article
/// </summary>
[DataField, ViewVariables]
public string DraftContent = "";
}