Files
tbd-station-14/Content.Shared/Paper/SharedPaperComponent.cs
Krunklehorn 1de3f24f16 Add sfx for writing on paper (#25257)
* Initial commit

* Moved params to sound

* Removed type tag

* Removed null check

* Forced default
2024-02-16 16:48:18 -07:00

67 lines
1.6 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.Serialization;
namespace Content.Shared.Paper;
public abstract partial class SharedPaperComponent : Component
{
/// <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
}
}