using Content.Shared.Damage.Prototypes; using Content.Shared.Dataset; using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Damage.ForceSay; /// /// This is used for forcing clients to send messages with a suffix attached (like -GLORF) when taking large amounts /// of damage, or things like entering crit or being stunned. /// [RegisterComponent, NetworkedComponent] public sealed partial class DamageForceSayComponent : Component { /// /// The localization string that the message & suffix will be passed into /// [DataField] public LocId ForceSayMessageWrap = "damage-force-say-message-wrap"; /// /// Same as but for cases where no suffix is used, /// such as when going into crit. /// [DataField] public LocId ForceSayMessageWrapNoSuffix = "damage-force-say-message-wrap-no-suffix"; /// /// The fluent string prefix to use when picking a random suffix /// [DataField] public ProtoId ForceSayStringDataset = "ForceSayStringDataset"; /// /// The amount of total damage between that needs to be taken before /// a force say occurs. /// [DataField] public FixedPoint2 DamageThreshold = FixedPoint2.New(5); /// /// A list of damage group types that are considered when checking . /// [DataField] public HashSet>? ValidDamageGroups = new() { "Brute", "Burn", }; /// /// The time enforced between force says to avoid spam. /// [DataField] public TimeSpan Cooldown = TimeSpan.FromSeconds(5.0); public TimeSpan? NextAllowedTime = null; }