Clean up new HTNs tasks (#28469)

* Clean up new HTNs tasks

* Added docs to math operations
This commit is contained in:
Tornado Tech
2024-06-02 03:46:35 +10:00
committed by GitHub
parent 81a328c543
commit a29b6a6894
12 changed files with 58 additions and 25 deletions

View File

@@ -1,16 +1,17 @@
namespace Content.Server.NPC.HTN.Preconditions.Math;
/// <summary>
/// Checks for the presence of data in the blackboard and makes a comparison with the specified boolean
/// Checks if there is a bool value for the specified <see cref="KeyBoolEqualsPrecondition.Key"/>
/// in the <see cref="NPCBlackboard"/> and the specified value is equal to the <see cref="KeyBoolEqualsPrecondition.Value"/>.
/// </summary>
public sealed partial class KeyBoolEqualsPrecondition : HTNPrecondition
{
[Dependency] private readonly IEntityManager _entManager = default!;
[DataField(required: true)]
[DataField(required: true), ViewVariables]
public string Key = string.Empty;
[DataField(required: true)]
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public bool Value;
public override bool IsMet(NPCBlackboard blackboard)