Files
wwdpublic/Content.Shared/Paper/SharedPaperComponent.cs
Krunklehorn b1e1ec66ea Add sfx for writing on paper (#25257)
* Initial commit

* Moved params to sound

* Removed type tag

* Removed null check

* Forced default

(cherry picked from commit 1de3f24f16733521d22543708a59e72a6b396c71)
2024-02-18 23:25:50 +01: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
}
}