using Content.Server.Chat.Systems; using Content.Shared.Chat.Prototypes; using Content.Shared.Chemistry.Reagent; using JetBrains.Annotations; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Chemistry.ReagentEffects; /// /// Tries to force someone to emote (scream, laugh, etc). /// [UsedImplicitly] public sealed class Emote : ReagentEffect { [DataField("emote", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? EmoteId; [DataField("showInChat")] public bool ShowInChat; public override void Effect(ReagentEffectArgs args) { if (EmoteId == null) return; var chatSys = args.EntityManager.System(); if (ShowInChat) chatSys.TryEmoteWithChat(args.SolutionEntity, EmoteId, ChatTransmitRange.GhostRangeLimit); else chatSys.TryEmoteWithoutChat(args.SolutionEntity, EmoteId); } }