Files
tbd-station-14/Content.Shared/Paper/SharedPaperComponent.cs
metalgearsloth 5896e68752 Content update for UI prediction (#27214)
* Content update for UI refactor

* Big update

* Sharing

* Remaining content updates

* First big update

* Prototype updates

* AUGH

* Fix UI comp ref

* Cleanup

- Fix predicted message, fix item slots, fix interaction range check.

* Fix regressions

* Make this predictive

idk why it wasn't.

* Fix slime merge

* Merge conflict

* Fix merge
2024-04-26 18:16:24 +10:00

69 lines
1.6 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Paper;
[NetworkedComponent]
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
}
}