using System; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; namespace Content.Shared.Interfaces.GameObjects.Components { /// /// This interface gives components behavior when using the entity in your active hand /// (done by clicking the entity in the active hand or pressing the keybind that defaults to Z). /// public interface IUse { /// /// Called when we activate an object we are holding to use it /// /// bool UseEntity(UseEntityEventArgs eventArgs); } public class UseEntityEventArgs : EventArgs { public IEntity User { get; set; } } /// /// Raised when using the entity in your hands. /// [PublicAPI] public class UseInHandMessage : EntitySystemMessage { /// /// If this message has already been "handled" by a previous system. /// public bool Handled { get; set; } /// /// Entity holding the item in their hand. /// public IEntity User { get; } /// /// Item that was used. /// public IEntity Used { get; } public UseInHandMessage(IEntity user, IEntity used) { User = user; Used = used; } } }