using System; using JetBrains.Annotations; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; namespace Content.Shared.Interfaces.GameObjects.Components { /// /// This interface gives components behavior when being clicked on by a user with an empty hand /// who is in range and has unobstructed reach of the target entity (allows inside blockers). /// [RequiresExplicitImplementation] public interface IInteractHand { /// /// Called when a player directly interacts with an empty hand when user is in range of the target entity. /// bool InteractHand(InteractHandEventArgs eventArgs); } public class InteractHandEventArgs : EventArgs, ITargetedInteractEventArgs { public IEntity User { get; set; } public IEntity Target { get; set; } } /// /// Raised when being clicked on or "attacked" by a user with an empty hand. /// [PublicAPI] public class AttackHandMessage : EntitySystemMessage { /// /// If this message has already been "handled" by a previous system. /// public bool Handled { get; set; } /// /// Entity that triggered the attack. /// public IEntity User { get; } /// /// Entity that was attacked. /// public IEntity Attacked { get; } public AttackHandMessage(IEntity user, IEntity attacked) { User = user; Attacked = attacked; } } }