using System; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; namespace Content.Shared.Interfaces.GameObjects.Components { /// /// This interface gives components behavior when landing after being thrown. /// public interface ILand { void Land(LandEventArgs eventArgs); } public class LandEventArgs : EventArgs { public LandEventArgs(IEntity user, EntityCoordinates landingLocation) { User = user; LandingLocation = landingLocation; } public IEntity User { get; } public EntityCoordinates LandingLocation { get; } } /// /// Raised when an entity that was thrown lands. /// [PublicAPI] public class LandMessage : EntitySystemMessage { /// /// If this message has already been "handled" by a previous system. /// public bool Handled { get; set; } /// /// Entity that threw the item. /// public IEntity User { get; } /// /// Item that was thrown. /// public IEntity Thrown { get; } /// /// Location where the item landed. /// public EntityCoordinates LandLocation { get; } public LandMessage(IEntity user, IEntity thrown, EntityCoordinates landLocation) { User = user; Thrown = thrown; LandLocation = landLocation; } } }