using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Paper; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class PaperComponent : Component { public PaperAction Mode; [DataField("content"), AutoNetworkedField] public string Content { get; set; } = ""; [DataField("contentSize")] public int ContentSize { get; set; } = 6000; [DataField("stampedBy"), AutoNetworkedField] public List StampedBy { get; set; } = new(); /// /// Stamp to be displayed on the paper, state from bureaucracy.rsi /// [DataField("stampState"), AutoNetworkedField] public string? StampState { get; set; } [DataField, AutoNetworkedField] public bool EditingDisabled; /// /// Sound played after writing to the paper. /// [DataField("sound")] public SoundSpecifier? Sound { get; private set; } = new SoundCollectionSpecifier("PaperScribbles", AudioParams.Default.WithVariation(0.1f)); [Serializable, NetSerializable] public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState { public readonly string Text; public readonly List StampedBy; public readonly PaperAction Mode; public PaperBoundUserInterfaceState(string text, List stampedBy, PaperAction mode = PaperAction.Read) { Text = text; StampedBy = stampedBy; Mode = mode; } } [Serializable, NetSerializable] public sealed class PaperInputTextMessage : BoundUserInterfaceMessage { public readonly string Text; public PaperInputTextMessage(string text) { Text = text; } } [Serializable, NetSerializable] public enum PaperUiKey { Key } [Serializable, NetSerializable] public enum PaperAction { Read, Write, } [Serializable, NetSerializable] public enum PaperVisuals : byte { Status, Stamp } [Serializable, NetSerializable] public enum PaperStatus : byte { Blank, Written } }