Files
Delta-v/Content.Server/_Goobstation/Emoting/AnimatedEmotesSystem.cs
T
slarticodefastandpa.pecherskij 8ac76060bb 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

Removed Incompatible RMC Emotes stuff.

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-12-29 11:39:24 -06:00

29 lines
789 B
C#

using Robust.Shared.GameStates;
using Content.Shared.Chat;
using Content.Shared.Chat.Prototypes;
using Content.Shared.Emoting;
using Robust.Shared.Prototypes;
namespace Content.Server.Emoting;
public sealed partial class AnimatedEmotesSystem : SharedAnimatedEmotesSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<AnimatedEmotesComponent, EmoteEvent>(OnEmote);
}
private void OnEmote(EntityUid uid, AnimatedEmotesComponent component, ref EmoteEvent args)
{
PlayEmoteAnimation(uid, component, args.Emote.ID);
}
public void PlayEmoteAnimation(EntityUid uid, AnimatedEmotesComponent component, ProtoId<EmotePrototype> prot)
{
component.Emote = prot;
Dirty(uid, component);
}
}