Files
tbd-station-14/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs
2021-07-16 17:37:09 -07:00

31 lines
895 B
C#

using Robust.Shared.GameObjects;
namespace Content.Shared.Actions.Behaviors
{
/// <summary>
/// Action which is used on a targeted entity.
/// </summary>
public interface ITargetEntityAction : IActionBehavior
{
/// <summary>
/// Invoked when the target entity action should be performed.
/// Implementation should perform the server side logic of the action.
/// </summary>
void DoTargetEntityAction(TargetEntityActionEventArgs args);
}
public class TargetEntityActionEventArgs : ActionEventArgs
{
/// <summary>
/// Entity being targeted
/// </summary>
public readonly IEntity Target;
public TargetEntityActionEventArgs(IEntity performer, ActionType actionType, IEntity target) :
base(performer, actionType)
{
Target = target;
}
}
}