| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- 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<StampDisplayInfo> StampedBy { get; set; } = new();
- /// <summary>
- /// Stamp to be displayed on the paper, state from bureaucracy.rsi
- /// </summary>
- [DataField("stampState"), AutoNetworkedField]
- public string? StampState { get; set; }
- [DataField, AutoNetworkedField]
- public bool EditingDisabled;
- /// <summary>
- /// Sound played after writing to the paper.
- /// </summary>
- [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<StampDisplayInfo> StampedBy;
- public readonly PaperAction Mode;
- public PaperBoundUserInterfaceState(string text, List<StampDisplayInfo> 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
- }
- }
|