HTNPrimitiveTask.cs 1.1 KB

123456789101112131415161718192021222324252627
  1. using Content.Server.NPC.HTN.Preconditions;
  2. using Content.Server.NPC.Queries;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.NPC.HTN.PrimitiveTasks;
  5. public sealed partial class HTNPrimitiveTask : HTNTask
  6. {
  7. /// <summary>
  8. /// Should we re-apply our blackboard state as a result of our operator during startup?
  9. /// This means you can re-use old data, e.g. re-using a pathfinder result, and avoid potentially expensive operations.
  10. /// </summary>
  11. [DataField("applyEffectsOnStartup")] public bool ApplyEffectsOnStartup = true;
  12. /// <summary>
  13. /// What needs to be true for this task to be able to run.
  14. /// The operator may also implement its own checks internally as well if every primitive task using it requires it.
  15. /// </summary>
  16. [DataField("preconditions")] public List<HTNPrecondition> Preconditions = new();
  17. [DataField("operator", required:true)] public HTNOperator Operator = default!;
  18. /// <summary>
  19. /// Services actively tick and can potentially update keys, such as combat target.
  20. /// </summary>
  21. [DataField("services")] public List<UtilityService> Services = new();
  22. }