using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; namespace Content.Server.GameObjects.EntitySystems { /// /// This interface gives components the ability to block certain effects /// from affecting the owning entity. For actions see /// public interface IEffectBlocker { bool CanFall() => true; } /// /// Utility methods to check if an effect is allowed to affect a specific entity. /// For actions see /// public class EffectBlockerSystem : EntitySystem { public static bool CanFall(IEntity entity) { var canFall = true; foreach (var blocker in entity.GetAllComponents()) { canFall &= blocker.CanFall(); // Sets var to false if false } return canFall; } } }