#nullable enable using System; using System.Collections.Generic; using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Damage; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers { /// /// A trigger that will activate when any of its triggers have activated. /// [Serializable] [DataDefinition] public class OrTrigger : IThresholdTrigger { [DataField("triggers")] public List Triggers { get; } = new(); public bool Reached(IDamageableComponent damageable, DestructibleSystem system) { foreach (var trigger in Triggers) { if (trigger.Reached(damageable, system)) { return true; } } return false; } } }