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,13 +1,17 @@
namespace Content.Server.NPC.HTN.Preconditions.Math;
/// <summary>
/// Checks if there is a float value for the specified <see cref="KeyFloatGreaterPrecondition.Key"/>
/// in the <see cref="NPCBlackboard"/> and the specified value is less then <see cref="KeyFloatGreaterPrecondition.Value"/>.
/// </summary>
public sealed partial class KeyFloatLessPrecondition : 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 float Value;
public override bool IsMet(NPCBlackboard blackboard)