NPCUseActionOnTargetComponent.cs 771 B

123456789101112131415161718192021222324252627
  1. using Content.Server.NPC.Systems;
  2. using Content.Shared.Actions;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.NPC.Components;
  5. /// <summary>
  6. /// This is used for an NPC that constantly tries to use an action on a given target.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(NPCUseActionOnTargetSystem))]
  9. public sealed partial class NPCUseActionOnTargetComponent : Component
  10. {
  11. /// <summary>
  12. /// HTN blackboard key for the target entity
  13. /// </summary>
  14. [DataField]
  15. public string TargetKey = "Target";
  16. /// <summary>
  17. /// Action that's going to attempt to be used.
  18. /// </summary>
  19. [DataField(required: true)]
  20. public EntProtoId<EntityWorldTargetActionComponent> ActionId;
  21. [DataField]
  22. public EntityUid? ActionEnt;
  23. }