Files
tbd-station-14/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs
2021-06-09 22:19:39 +02:00

32 lines
912 B
C#

#nullable enable
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;
}
}
}