Files
tbd-station-14/Content.Server/NPC/Components/NPCUseActionOnTargetComponent.cs
2025-05-28 15:52:11 -04:00

28 lines
771 B
C#

using Content.Server.NPC.Systems;
using Content.Shared.Actions.Components;
using Robust.Shared.Prototypes;
namespace Content.Server.NPC.Components;
/// <summary>
/// This is used for an NPC that constantly tries to use an action on a given target.
/// </summary>
[RegisterComponent, Access(typeof(NPCUseActionOnTargetSystem))]
public sealed partial class NPCUseActionOnTargetComponent : Component
{
/// <summary>
/// HTN blackboard key for the target entity
/// </summary>
[DataField]
public string TargetKey = "Target";
/// <summary>
/// Action that's going to attempt to be used.
/// </summary>
[DataField(required: true)]
public EntProtoId<TargetActionComponent> ActionId;
[DataField]
public EntityUid? ActionEnt;
}