using System; using Content.Shared.Hands.Components; using Content.Shared.Inventory; using JetBrains.Annotations; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; namespace Content.Shared.Hands { /// /// This interface gives components behavior when their entity is put in a hand inventory slot, /// even if it came from another hand slot (which would also fire ). /// This includes moving the entity from a non-hand slot into a hand slot /// (which would also fire ). /// [RequiresExplicitImplementation] public interface IEquippedHand { [Obsolete("Use EquippedHandMessage instead")] void EquippedHand(EquippedHandEventArgs eventArgs); } public class EquippedHandEventArgs : UserEventArgs { public EquippedHandEventArgs(IEntity user, HandState hand) : base(user) { Hand = hand; } public HandState Hand { get; } } /// /// Raised when putting an entity into a hand slot /// [PublicAPI] public class EquippedHandEvent : HandledEntityEventArgs { /// /// Entity that equipped the item. /// public IEntity User { get; } /// /// Item that was equipped. /// public IEntity Equipped { get; } /// /// Hand that the item was placed into. /// public HandState Hand { get; } public EquippedHandEvent(IEntity user, IEntity equipped, HandState hand) { User = user; Equipped = equipped; Hand = hand; } } }