using Content.Shared.Interaction;
using Content.Shared.Physics;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Actions.Components;
///
/// An action that targets an entity or map.
/// Requires .
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedActionsSystem))]
[EntityCategory("Actions")]
public sealed partial class TargetActionComponent : Component
{
///
/// For entity- or map-targeting actions, if this is true the action will remain selected after it is used, so
/// it can be continuously re-used. If this is false, the action will be deselected after one use.
///
[DataField]
public bool Repeat;
///
/// For entity- or map-targeting action, determines whether the action is deselected if the user doesn't click a valid target.
///
[DataField]
public bool DeselectOnMiss;
///
/// Whether the action system should block this action if the user cannot actually access the target
/// (unobstructed, in inventory, in backpack, etc). Some spells or abilities may want to disable this and
/// implement their own checks.
///
///
/// Even if this is false, the will still be checked.
///
[DataField]
public bool CheckCanAccess = true;
///
/// The collision group to use to check for accessibility if is true.
///
[DataField]
public CollisionGroup AccessMask = SharedInteractionSystem.InRangeUnobstructedMask;
///
/// The allowed range for a target to be. If zero or negative, the range check is skipped,
/// unless is true.
///
[DataField]
public float Range = SharedInteractionSystem.InteractionRange;
///
/// If the target is invalid, this bool determines whether the left-click will default to performing a standard-interaction
///
///
/// Interactions will still be blocked if the target-validation generates a pop-up
///
[DataField]
public bool InteractOnMiss;
///
/// If true, and if is enabled, then this action's icon will be drawn by that
/// over lay in place of the currently held item "held item".
///
[DataField]
public bool TargetingIndicator = true;
}