action refactor proper ecs edition (#27422)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
using Content.Shared.Actions.Components;
|
||||
using static Robust.Shared.Input.Binding.PointerInputCmdHandler;
|
||||
|
||||
namespace Content.Client.Actions;
|
||||
|
||||
/// <summary>
|
||||
@@ -7,3 +10,17 @@ public sealed class FillActionSlotEvent : EntityEventArgs
|
||||
{
|
||||
public EntityUid? Action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client-side event used to attempt to trigger a targeted action.
|
||||
/// This only gets raised if the has <see cref="TargetActionComponent">.
|
||||
/// Handlers must set <c>Handled</c> to true, then if the action has been performed,
|
||||
/// i.e. a target is found, then FoundTarget must be set to true.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct ActionTargetAttemptEvent(
|
||||
PointerInputCmdArgs Input,
|
||||
Entity<ActionsComponent> User,
|
||||
ActionComponent Action,
|
||||
bool Handled = false,
|
||||
bool FoundTarget = false);
|
||||
|
||||
Reference in New Issue
Block a user