using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Actions.Components;
///
/// Used on action entities to define an action that triggers when targeting an entity.
/// If used with , the event here can be set to null and Optional should be set.
/// Then can have TargetEntity optionally set to the client's hovered entity, if it is valid.
/// Using entity-world targeting like this will always give coords, but doesn't need to have an entity.
///
///
/// Requires .
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedActionsSystem))]
[EntityCategory("Actions")]
[AutoGenerateComponentState]
public sealed partial class EntityTargetActionComponent : Component
{
///
/// The local-event to raise when this action is performed.
/// If this is null entity-world targeting is done as specified on the component doc.
///
[DataField, NonSerialized]
public EntityTargetActionEvent? Event;
///
/// Determines which entities are valid targets for this action.
///
/// No whitelist check when null.
[DataField, AutoNetworkedField]
public EntityWhitelist? Whitelist;
///
/// Determines which entities cannot be valid targets for this action, even if matching the whitelist.
///
/// No blacklist check when null.
[DataField, AutoNetworkedField]
public EntityWhitelist? Blacklist;
///
/// Whether this action considers the user as a valid target entity when using this action.
///
[DataField, AutoNetworkedField]
public bool CanTargetSelf = true;
///
/// Whether to make the user face towards the direction where they targeted this action.
///
[DataField, AutoNetworkedField]
public bool RotateOnUse = true;
}