using System;
using JetBrains.Annotations;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
namespace Content.Shared.Throwing
{
///
/// This interface gives components behavior when thrown.
///
[RequiresExplicitImplementation]
public interface IThrown
{
[Obsolete("Use ThrownMessage instead")]
void Thrown(ThrownEventArgs eventArgs);
}
public class ThrownEventArgs : EventArgs
{
public ThrownEventArgs(EntityUid user)
{
User = user;
}
public EntityUid User { get; }
}
///
/// Raised when throwing the entity in your hands.
///
[PublicAPI]
public class ThrownEvent : HandledEntityEventArgs
{
///
/// Entity that threw the item.
///
public EntityUid User { get; }
///
/// Item that was thrown.
///
public EntityUid Thrown { get; }
public ThrownEvent(EntityUid user, EntityUid thrown)
{
User = user;
Thrown = thrown;
}
}
}