Files
OldThink/Content.Shared/Actions/Behaviors/ITargetEntityItemAction.cs

33 lines
1002 B
C#
Raw Normal View History

using Content.Shared.Actions.Behaviors.Item;
using Robust.Shared.GameObjects;
2021-06-09 22:19:39 +02:00
namespace Content.Shared.Actions.Behaviors
{
/// <summary>
/// Item action which is used on a targeted entity.
/// </summary>
public interface ITargetEntityItemAction : IItemActionBehavior
{
/// <summary>
/// Invoked when the target entity action should be performed.
/// Implementation should perform the server side logic of the action.
/// </summary>
void DoTargetEntityAction(TargetEntityItemActionEventArgs args);
}
public class TargetEntityItemActionEventArgs : ItemActionEventArgs
{
/// <summary>
/// Entity being targeted
/// </summary>
2021-12-04 12:47:09 +01:00
public readonly EntityUid Target;
2021-12-04 12:47:09 +01:00
public TargetEntityItemActionEventArgs(EntityUid performer, EntityUid target, EntityUid item,
ItemActionType actionType) : base(performer, item, actionType)
{
Target = target;
}
}
}