Paper and pen (#582)

* A very basic paper and pen implementation

* Removes SharedWriteComponent

* Update ContentNetIDs.cs
This commit is contained in:
adrian
2020-02-11 20:01:05 -03:00
committed by GitHub
parent b965dfea33
commit 9544099c99
9 changed files with 273 additions and 1 deletions

View File

@@ -0,0 +1,63 @@
using System;
using System.Net.Mime;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components
{
public class SharedPaperComponent : Component
{
public override string Name => "Paper";
[Serializable, NetSerializable]
public class PaperBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly string Text;
public readonly PaperAction Mode;
public PaperBoundUserInterfaceState(string text, PaperAction mode = PaperAction.Read)
{
Text = text;
Mode = mode;
}
}
[Serializable, NetSerializable]
public class PaperActionMessage : BoundUserInterfaceMessage
{
public readonly PaperAction Action;
public PaperActionMessage(PaperAction action)
{
Action = action;
}
}
[Serializable, NetSerializable]
public class PaperInputText : BoundUserInterfaceMessage
{
public readonly string Text;
public PaperInputText(string text)
{
Text = text;
}
}
[Serializable, NetSerializable]
public enum PaperUiKey
{
Key
}
[Serializable, NetSerializable]
public enum PaperAction
{
Read,
Write,
CrossOut,
Stamp
}
}
}