Move ChatSystem.Emotes to shared (#40866)

* move to shared

* entity effect to shared

* refactor: whitespaces+xml-doc typo fixups

* refactor: a little bit more of xml-doc typos fixups

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
This commit is contained in:
slarticodefast
2025-10-13 20:06:01 +02:00
committed by GitHub
parent 774468ad71
commit ee9d1032bb
28 changed files with 209 additions and 171 deletions

View File

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