using Content.Shared.Decals; using Content.Shared.DoAfter; using Content.Shared.SprayPainter.Prototypes; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.SprayPainter; [Serializable, NetSerializable] public enum SprayPainterUiKey { Key, } [Serializable, NetSerializable] public sealed class SprayPainterSetDecalMessage(ProtoId protoId) : BoundUserInterfaceMessage { public ProtoId DecalPrototype = protoId; } [Serializable, NetSerializable] public sealed class SprayPainterSetDecalColorMessage(Color? color) : BoundUserInterfaceMessage { public Color? Color = color; } [Serializable, NetSerializable] public sealed class SprayPainterSetDecalSnapMessage(bool snap) : BoundUserInterfaceMessage { public bool Snap = snap; } [Serializable, NetSerializable] public sealed class SprayPainterSetDecalAngleMessage(int angle) : BoundUserInterfaceMessage { public int Angle = angle; } [Serializable, NetSerializable] public sealed class SprayPainterTabChangedMessage(int index, bool isSelectedTabWithDecals) : BoundUserInterfaceMessage { public readonly int Index = index; public readonly bool IsSelectedTabWithDecals = isSelectedTabWithDecals; } [Serializable, NetSerializable] public sealed class SprayPainterSetPaintableStyleMessage(string group, string style) : BoundUserInterfaceMessage { public readonly string Group = group; public readonly string Style = style; } [Serializable, NetSerializable] public sealed class SprayPainterSetPipeColorMessage(string? key) : BoundUserInterfaceMessage { public readonly string? Key = key; } [Serializable, NetSerializable] public sealed partial class SprayPainterDoAfterEvent : DoAfterEvent { /// /// The prototype to use to repaint this object. /// [DataField] public string Prototype; /// /// The group ID of the object being painted. /// [DataField] public string Group; /// /// The cost, in charges, to paint this object. /// [DataField] public int Cost; public SprayPainterDoAfterEvent(string prototype, string group, int cost) { Prototype = prototype; Group = group; Cost = cost; } public override DoAfterEvent Clone() => this; } [Serializable, NetSerializable] public sealed partial class SprayPainterPipeDoAfterEvent : DoAfterEvent { /// /// Color of the pipe to set. /// [DataField] public Color Color; public SprayPainterPipeDoAfterEvent(Color color) { Color = color; } public override DoAfterEvent Clone() => this; } /// /// An action raised on an entity when it is spray painted. /// /// The entity painting this item. /// The entity used to paint this item. /// The prototype used to generate the new painted appearance. /// The group of the entity being painted (e.g. airlocks with glass, canisters). [ByRefEvent] public partial record struct EntityPaintedEvent( EntityUid? User, EntityUid Tool, EntProtoId Prototype, ProtoId Group);