Minor paper ECS and stamps (#7394)

Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
Fishfish458
2022-04-08 17:37:22 -06:00
committed by GitHub
parent eac154ca1b
commit ddf2d8815b
23 changed files with 450 additions and 133 deletions

View File

@@ -1,11 +1,8 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Paper
{
[Virtual]
public class SharedPaperComponent : Component
public abstract class SharedPaperComponent : Component
{
[Serializable, NetSerializable]
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
@@ -21,21 +18,11 @@ namespace Content.Shared.Paper
}
[Serializable, NetSerializable]
public sealed class PaperActionMessage : BoundUserInterfaceMessage
{
public readonly PaperAction Action;
public PaperActionMessage(PaperAction action)
{
Action = action;
}
}
[Serializable, NetSerializable]
public sealed class PaperInputText : BoundUserInterfaceMessage
public sealed class PaperInputTextMessage : BoundUserInterfaceMessage
{
public readonly string Text;
public PaperInputText(string text)
public PaperInputTextMessage(string text)
{
Text = text;
}
@@ -52,14 +39,13 @@ namespace Content.Shared.Paper
{
Read,
Write,
CrossOut,
Stamp
}
[Serializable, NetSerializable]
public enum PaperVisuals : byte
{
Status
Status,
Stamp
}
[Serializable, NetSerializable]
@@ -68,6 +54,5 @@ namespace Content.Shared.Paper
Blank,
Written
}
}
}

View File

@@ -0,0 +1,19 @@
namespace Content.Shared.Paper
{
[RegisterComponent]
public class StampComponent : Component
{
/// <summary>
/// The loc string name that will be stamped to the piece of paper on examine.
/// </summary>
[ViewVariables]
[DataField("stampedName")]
public string StampedName { get; set; } = "stamp-component-stamped-name-default";
/// <summary>
/// Tne sprite state of the stamp to display on the paper from bureacracy.rsi.
/// </summary>
[ViewVariables]
[DataField("stampState")]
public string StampState { get; set; } = "paper_stamp-generic";
}
}