using System.Threading;
using System.Threading.Tasks;
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators.Math;
///
/// Set to bool value for the
/// specified in the .
///
public sealed partial class SetBoolOperator : HTNOperator
{
[DataField(required: true), ViewVariables]
public string TargetKey = string.Empty;
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Value;
public override async Task<(bool Valid, Dictionary? Effects)> Plan(NPCBlackboard blackboard,
CancellationToken cancelToken)
{
return (
true,
new Dictionary
{
{ TargetKey, Value }
}
);
}
}