Pipe painter (now with airlock painter) (#19031)
* Add a pipe painting function to the airlock painter Signed-off-by: c4llv07e <kseandi@gmail.com> * Rename engineer painter to omnipainter Signed-off-by: c4llv07e <kseandi@gmail.com> * review changes Signed-off-by: c4llv07e <kseandi@gmail.com> * fix migration duplicate Signed-off-by: c4llv07e <kseandi@gmail.com> --------- Signed-off-by: c4llv07e <kseandi@gmail.com>
This commit is contained in:
69
Content.Shared/SprayPainter/SprayPainterEvents.cs
Normal file
69
Content.Shared/SprayPainter/SprayPainterEvents.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using Content.Shared.DoAfter;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.SprayPainter;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum SprayPainterUiKey
|
||||
{
|
||||
Key,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class SprayPainterSpritePickedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public int Index { get; }
|
||||
|
||||
public SprayPainterSpritePickedMessage(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class SprayPainterColorPickedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public string? Key { get; }
|
||||
|
||||
public SprayPainterColorPickedMessage(string? key)
|
||||
{
|
||||
Key = key;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class SprayPainterBoundUserInterfaceState : BoundUserInterfaceState
|
||||
{
|
||||
public int SelectedStyle { get; }
|
||||
public string? SelectedColorKey { get; }
|
||||
public Dictionary<string, Color> Palette { get; }
|
||||
|
||||
public SprayPainterBoundUserInterfaceState(int selectedStyle, string? selectedColorKey, Dictionary<string, Color> palette)
|
||||
{
|
||||
SelectedStyle = selectedStyle;
|
||||
SelectedColorKey = selectedColorKey;
|
||||
Palette = palette;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class SprayPainterDoAfterEvent : DoAfterEvent
|
||||
{
|
||||
[DataField("sprite")]
|
||||
public readonly string? Sprite = null;
|
||||
|
||||
[DataField("color")]
|
||||
public readonly Color? Color = null;
|
||||
|
||||
private SprayPainterDoAfterEvent()
|
||||
{
|
||||
}
|
||||
|
||||
public SprayPainterDoAfterEvent(string? sprite, Color? color)
|
||||
{
|
||||
Sprite = sprite;
|
||||
Color = color;
|
||||
}
|
||||
|
||||
public override DoAfterEvent Clone() => this;
|
||||
}
|
||||
Reference in New Issue
Block a user