#nullable enable using System; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; using Robust.Shared.Map; namespace Content.Shared.Interfaces.GameObjects.Components { [RequiresExplicitImplementation] public interface IThrowCollide { void HitBy(ThrowCollideEventArgs eventArgs) {} void DoHit(ThrowCollideEventArgs eventArgs) {} } public class ThrowCollideEventArgs : EventArgs { /// /// The entity that threw and hit . /// public IEntity? User { get; } /// /// The entity thrown by that hit /// public IEntity Thrown { get; } /// /// The entity hit with by /// public IEntity Target { get; } public ThrowCollideEventArgs(IEntity? user, IEntity thrown, IEntity target) { User = user; Thrown = thrown; Target = target; } } public class ThrowCollideMessage : EntitySystemMessage { /// /// If this message has already been "handled" by a previous system. /// public bool Handled { get; set; } /// /// The entity that threw . /// public IEntity? User { get; } /// /// The entity thrown by that hit /// public IEntity Thrown { get; } /// /// The entity hit with by /// public IEntity Target { get; } public ThrowCollideMessage(IEntity? user, IEntity thrown, IEntity target) { User = user; Thrown = thrown; Target = target; } } }