2021-07-17 02:37:09 +02:00
|
|
|
|
using Content.Shared.Actions.Behaviors.Item;
|
2021-02-27 04:12:09 +01:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-12-13 14:28:20 -08:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Shared.Actions.Behaviors
|
2020-12-13 14:28:20 -08:00
|
|
|
|
{
|
|
|
|
|
|
/// <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;
|
2020-12-13 14:28:20 -08:00
|
|
|
|
|
2021-12-04 12:47:09 +01:00
|
|
|
|
public TargetEntityItemActionEventArgs(EntityUid performer, EntityUid target, EntityUid item,
|
2020-12-13 14:28:20 -08:00
|
|
|
|
ItemActionType actionType) : base(performer, item, actionType)
|
|
|
|
|
|
{
|
|
|
|
|
|
Target = target;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|