using Content.Shared.Damage; namespace Content.Server.Destructible.Thresholds.Triggers { /// /// A trigger that will activate when the amount of damage received /// is above the specified threshold. /// [Serializable] [DataDefinition] public sealed partial class DamageTrigger : IThresholdTrigger { /// /// The amount of damage at which this threshold will trigger. /// [DataField("damage", required: true)] public int Damage { get; set; } = default!; public bool Reached(DamageableComponent damageable, DestructibleSystem system) { return damageable.TotalDamage >= Damage; } } }