using Content.Shared.Chat.Prototypes; using Content.Shared.Inventory; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Chat; /// /// An event raised just before an emote is performed, providing systems with an opportunity to cancel the emote's performance. /// [ByRefEvent] public sealed class BeforeEmoteEvent(EntityUid source, EmotePrototype emote) : CancellableEntityEventArgs, IInventoryRelayEvent { public readonly EntityUid Source = source; public readonly EmotePrototype Emote = emote; /// /// The equipment that is blocking emoting. Should only be non-null if the event was canceled. /// public EntityUid? Blocker = null; public SlotFlags TargetSlots => SlotFlags.WITHOUT_POCKET; } /// /// Raised by the chat system when an entity made some emote. /// Use it to play sound, change sprite or something else. /// [ByRefEvent] public record struct EmoteEvent(EmotePrototype Emote) { /// /// The used emote. /// public EmotePrototype Emote = Emote; /// /// If this message has already been "handled" by a previous system. /// public bool Handled; } /// /// Sent by the client when requesting the server to play a specific emote selected from the emote radial menu. /// [Serializable, NetSerializable] public sealed class PlayEmoteMessage(ProtoId protoId) : EntityEventArgs { public readonly ProtoId ProtoId = protoId; }