namespace Content.Server.NPC.HTN.Preconditions.Math;
///
/// Checks if there is a float value for the specified
/// in the and the specified value is less then .
///
public sealed partial class KeyFloatLessPrecondition : HTNPrecondition
{
[Dependency] private readonly IEntityManager _entManager = default!;
[DataField(required: true), ViewVariables]
public string Key = string.Empty;
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public float Value;
public override bool IsMet(NPCBlackboard blackboard)
{
return blackboard.TryGetValue(Key, out var value, _entManager) && value < Value;
}
}